+ 5
JAM here are some good example and resources have an read into that
https://www.sololearn.com/post/91113/?ref=app
+ 2
JS is used to make html/css come to life. Withe the use of buttons, user events, time and date,storing cookies etc...
+ 1
https://www.w3schools.com/js/js_function_closures.asp
Very well explained here