1/4
Learning fundamentals of javascript
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Javacript Literals
The fixed values like Strings, numbers that can be decimals or integers.
Javascirpt Identifiers
The name given to variables are called identifiers. They can start with letter, underscore or $. Case sensitive and cannot be reserved keyword.
Javascipt Variable Declaration
After declaration there is no value in variable, its undefined.
Always use const if the type should not be changed (Arrays and Objects)
Variables declared with let have Block Scope
Variables declared with let must be Declared before use
Variables declared with let cannot be Redeclared in the same scope
Variables declared with the var always have Global Scope.
Variables defined with var can be redeclared.
Redeclaring a variable inside a block will also redeclare the variable outside the block
Redeclaring a variable using let inside a block will not redeclare the variable outside the block
Const defines a constant reference to a value
Javascript Datatypes
String, Number, BigInt, Boolean, Null, Undefined, Object, Symbol
You can use quotes inside a string, as long as they don't match the quotes surrounding the string
Undefined: "I don't know this yet"
A function that doesn't explicitly return anything will return undefined by default.
Null: "I intentionally made this empty"
The type of null is "object" (this is a famous, historical bug in JS).
null==undefined —> true
null===undefined —→ false