Tracy Nickel4,230 Points
Console.log placement in exercise
We originally placed the console.log in the html file during the learning videos. When we did the practice video at the end I placed the console.log statements around the <script src...> statement at the end of the body section in the html file. It does not state in the video if this would be an acceptable alternative way of doing this. The end result was the same, my statements appeared in the log at the right time....so just wondering if there is a best practice for this to know if need to place in js file or the html file? Thank you for your help. code in html file: <script> console.log("Start program"); </script> <script src="scripts.js"></script> <script> console.log("End program"); </script>
One Weru47,621 Points
... <!-- your html code --> <script src = 'index.js'></script>
Hope that answers your question.