Basic Javascript Flashcards
What is a variable?
container to store data
Why are variables useful?
as a reference, to go and get that data
What two special characters can a variable begin with?
$ dollar sign and _ underscore
How do you declare a variable?
the var keyword
How do you assign a value to a variable?
= known as the assignment operator or equal sign
Are variables case sensitive?
Yes
Which words cannot be used as variable names?
function, var, if, else, switch, no numbers at the beginning. Basically keywords
What is a string?
sub series of characters enclosed by quotes
What is the string concatenations operator?
the plus sign
What is the difference when it comes to using single quotes or double quotes?
nothing
How do you escape quotations characters?
\ backslash
What is type coercion?
converting value from one type to another
What is a number in Javascript?
a data type
What is an arithmetic operator
math function that takes two operands and performs a calculation on them
Name four of the arithmetic operators
+ - * /
What is the order of execution?
(PEMDAS) mult and div before add and sub
What is a boolean?
true or false data type