Why are there no script tags in the html in the code examples? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why are there no script tags in the html in the code examples?

missing script tags?

30th Jul 2016, 8:02 PM
genelogic
4 Answers
+ 1
@Jeremy Benson Thanks, but don't those files still need to be referred to by a script tag with a src= attribute in the html?
30th Jul 2016, 11:39 PM
genelogic
0
The tutorial mentions JS can live in .js files. Its normal to see js examples without script tags.
30th Jul 2016, 9:06 PM
Jeremy Benson
Jeremy Benson - avatar
0
You are right, I guess they could clarify that. This is an entry level course. I submitted this as feedback. However if you study further, expect to not script tags in code examples. Also js can be run on servers too now, in which case there will not be an html tag. Valid js is compiler agnostic after all.
2nd Aug 2016, 7:20 PM
Jeremy Benson
Jeremy Benson - avatar
0
because those are external files
10th Aug 2016, 6:50 AM
Jefta Pruim
Jefta Pruim - avatar