Introduction to JS Flashcards

1
Q

What are the three data values in JS?

A
  • Strings
  • booleans
  • number
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you create single line comments and multi line comments?

A

Single line comment: //Opening Line

Multi line comment: /* */

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How can you find the remainder after dividing two numbers?

A

6 % 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can you make the computer generate a random number, and how can you round this to a whole number too?

A

Math.random()

Math.floor(Math.random())

How well did you know this?
1
Not at all
2
3
4
5
Perfectly