True Basics Flashcards
How do you do one line comments in javascript ?
// enter comment here // enter comment2 here
How do you do multi-line comments in javascript?
/* comment blah blah blah */ this line ends the comment
How do you assign a value to a string variable?
var name = “george” ;
What does initializing a variable mean
assigning an initial value to a variable.
What date type does a variable value have if you do not assign a value?
undefined
Are variables case sensitive in javascript?
yes
Write three words together as one word to show you understand what camel case is.
helloMyFriend
What data type is the value 5 in javascript?
number
_____is a data type in javascript which represents numeric data
number
How do you add two numeric values in Javascript
5 + 5
How do you subtract two numeric values in javascript
7 - 3
How do you multiply two numeric values in javascript
7 * 3
How do you divide two numeric values in javascript
9 / 3
How do you increment the number of a variable in javascript (suppose i is the variable)
i++
How do you decrement the number of a variable in javascript (suppose i is the variable)
i–
What data type stores decimal numbers?
floating point
What is the operator for remainder
%
What what does the remainder operator return
The remainder that’s left over after division
Rewrite myVar = myVar + 5 into a compound assignment
myVar += 5
Rewrite myVar = myVar - 5 into a compound assignment
myVar -= 5
Rewrite myVar = myVar * 5 into a compound assignment
myVar *= 5
What does escaping a quote mean?
When you use the backslash from within quotations to include the same quotation character as a part of it.
How do you escape the “ character
"
How do you escape the ‘ character
'