<script src="" defer></script>
Attributes:
defer // waits until DOM is fully loaded
async // doesn't rely on other scripts, doesn't matter when script is executed
Used to add Javascript to HTML files.
let _$variableName1 = Data;
const Immutable = Data;
Use let if data should change, const if not. Can use $, underscore, or digits, can't start with a digit, camelCase. Use = to give a variable data. Don't use var.
; // semi-colons seperate statements
// Javascript ignores whitespace
{} // Codeblocks are contained, to group statements
function(){}; // JS requires keywords to start actions
Statements are used to write javascript code.
1. String // Includes characters, whitespace, symbols, surrounded by quotes
2. Number // Numbers that arithmetic value
3. Bigint // Store larger integer values
4. Boolean // True or False Values (On | Off)
5. Undefined // Value not assigned
6. Null // Reference to a non-existing object
7. Symbol // Create unique identifiers for objects
8. Object // Could be an object, array, date
All the different types of data used in javascript.
false, 0, ' ', null, undefined, NaN
Above are falsy values, everything else is truthy.