JavaScript - Basics Flashcards
ECMA Script is
The standard for javascript
A variable is not a value, but …
it points to a value
When naming a variable, it must start with…
a letter
When creating a variable we use the case convention called
camelCase
The difference between let and const is…
let creates variables that can have the value reassigned, const for the variables that shouldn’t be reassigned
The two categories of data types are
Primitives (immutable) and non-primitives (mutable)
The 7 primitive data types are:
string, number, bigint, boolean, undefined, null and symbol
The non-primitive data type is:
objects
If… else and switch statements are:
conditional statements
&& means
and
|| means
or
What is the syntax of a ternary operator?
condition ? return if condition is true : return if condition is false
A function is
a block of code that can be reused
What’s the difference between parameters and arguments?
parameters are defined when we create the function, arguments is the value we pass when calling the function
The return statement will
stop the execution of the function and give a value in return