Why does this log null? these are my only 2 lines of js
//JS
const div_1 = document.getElementById("photo-div-1");
console.log(div_1);
//HTML
<body>
<div id="photo-div-1"></div>
</body>
Why does this log null? these are my only 2 lines of js
//JS
const div_1 = document.getElementById("photo-div-1");
console.log(div_1);
//HTML
<body>
<div id="photo-div-1"></div>
</body>