JS Practical code Flashcards

1
Q
A

HTML code used to link the js file to html

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

alert(“Thanks for your input!”);

A

alert message pop up for the user

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

num++; is the same way of writing

A

num = num + 1;

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

how to have increments of the variable by 1

A

num++;

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

is num++ and ++num the same

A

nope, false

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

If you want to increment both variables, you must put the pluses before the variable,

A

++num

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

how to have a default value in the prompt

A

prompt(“ question”, “default value”);

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