JS Flashcards

1
Q

How does a FOR loop start in javascript?

A

for (i = 0; i <= 5; i++)

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

What will the following code return: Boolean(10 > 9)

A

true

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

How does a WHILE loop start?

A

while (i <= 10)

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

Inside which HTML element do we put the JavaScript?

A
<script>

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

How can you detect the client’s browser name?

A

navigator.appName

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

What is the correct JavaScript syntax for opening a new window called “w2” ?

A

w2 = window.new(“http://www.w3schools.com”);

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

How to write an IF statement in JavaScript?

A

if (i == 5)

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

What is the correct syntax for referring to an external script called “index.js”?

A
<script>

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