Best way to crash course JS

basics

inline scripting is when you use the script tag to write your scripts directly before the </body> tag

example

<html><head></head><body> <script> document.write('i am an inline script'); </script> </body></html>

for more information on the document object, check the mdn website, it's a biggie and is used all of the place for all sorts of things.

Many times you will not have one script, you will have multiple, and timeing control must be used so that your script executes at the end of all the html on the page loading. <script> document.write('I will write at a random time'); </script> <script defer> document.write('I will only write once all the html elements are present on the page');

/r/learnjavascript Thread Parent