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>
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
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>