"use strict"
var identifier [ = value]
let identifier [ = value]
main { initializations while not done processing process one bit of data If you need input prompt the user for input carry out he appropriate action
Set up the event handlers for the events the program is dealing with while not done if events.size() > 0 currentEvent = events.dequeue() call the appropriate event handler for currentEvent else call the idle event handler
const identifier = value;
console.log()
script
tags in html.
<script> let x = 7 console.log(x) </script>
script
tags.
src=
attribute.
</script>
)
<head> <script src="myfile.js"> </script> <script src="https://mirkwood.cs.edinboro.edu/~bennett/myScript.js"> </script>
defer
attribute, parsing and execution will only occur after the document is parsed.
src=
tag, it will not work for inline scripts.
document.getElementById(string)
id="unique-id"
is an attribute of an element in the document.
let myDiv = document.getElementById("theDiv") console.dir(myDiv)