~> Created by Brendan Eich in 1995
~> JavaScript was developed by Netscape.
~> There was a rival of JavaScript named VBScript (for Internet Explorer as it's Browser)
~> Javascript supports all browser, VBScript supports only IE browser
~> JavaScript code is inserted between tags.
~> Or we can link external Javascript file in HTML
~> Using defer attribute:
It's done to load JavaScript after HTML is fully loaded.
~> Run the file using command:
node pathOfFile_or_fileName.js
~> Comments:
// Single line Comments
/* Multi Line Comments */
~> .mjs files are modules and won't run on it's own but help other files to run by storing their logic separately for better maintainance.
~> if it's not working
change all connected files from .js to .mjs
(OR) inside the folder write command:
npm init -y
in package.json below "name" add:
"type":"module",