I’m working through the Ultimate JS Part 1 course and am doing the practice exercises for the lesson on Arrays. Specifically, for the exercise: ‘18- Exercise 2- Includes’, it appears that Mosh is executing the code for index.js directly in the browser console. Can someone please explain how this is done?
I’ve seen various ways to include a JS file within the dev tools console using document.write(), appendChild() or fetch() methods, but the code within the video doesn’t show that any of these techniques are used, so I’m unclear on how the code is being executed.
@Kamatz, right I agree with you there. It’s just that I noticed it doesn’t appear to be the way Mosh is doing it during the lesson. You’ll notice in the screenshot the file is index.js, not index.html. How do we accomplish that?
Was there any follow-up to this? I am having the same problem and i’ve gone through getting started 3-5 and am still at a loss for how to get the console to display on Chrome from .js instead of .html