JavaScript conforms to the ever-evolving ECMAScript standard.
ECMAScript 2015 is the current cutting-edge specification, previously known as ECMAScript 6 (ES6).
jQuery |
---|
Library of JavaScript functions |
Introduces CSS-like syntax and several visual and UI enhancements |
Simplifies the use of Javascript in websites |
An abstraction of the core language |
JavaScript Frameworks
Angular JS, React, Vue.js, and so on are front-end application frameworks used to simplify the building of advanced interactive web-based applications.
Javascript Loading Methods:
- Right away loading
- Asynchronous loading
- Deferred loading
Here’s how a page loads a script with defer
, put in the head
tag:

The script is fetched asynchronously, and it’s executed only after the HTML parsing is done.
Parsing finishes just like when we put the script at the end of the body
tag, but overall the script execution finishes well before, because the script has been downloaded in parallel with the HTML parsing.
JavaScript is case sensitive and using camelCase is recommended. Whitespace matters only to humans, not to JavaScript. End each statement with a semicolon is recommended. Comments should be used liberally to assist understanding of the code.
Variable declared without "var" will have global scope automatically.
DOM Element Creation Methods:
.createElement(); //create an element.
.createTextNode(); //create text node.
.appendChild(); //place one child node inside another.
Inline CSS:
.hasAttribute("style"); /*does the element has style? */
.getAttribute("style"); /*get the inline styles.*/
.setAttribute("style", "color:red"); /* add css property.*/
.removeAttribute("style"); /*remove inline styles.*/
break; // terminate the current loop.
continue; //terminate the current iteration of the loop
Tips and Resources:
https://brave.com/ a browser
Ctrl+Shift+J to open console in Chrome.
When writing in console, hit shift + enter keys to switch to the next line without adding a line break.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array