When I put the below code into VS Code and try to run this through the Terminal it produces an error (see attached). However, if I call this apps2.js file from my .html file it will produce the results of ‘it was true’.
Therefore, I’m just asking the basic question of:
- Can the apps2.js file be ran inside the VS Code Terminal to display the results, or does this always need to be called and ran through the .html file?
and the file name is apps2.js