JS Flashcards
1
Q
How does a FOR loop start in javascript?
A
for (i = 0; i <= 5; i++)
2
Q
What will the following code return: Boolean(10 > 9)
A
true
3
Q
How does a WHILE loop start?
A
while (i <= 10)
4
Q
Inside which HTML element do we put the JavaScript?
A
<script> </script>
5
Q
How can you detect the client’s browser name?
A
navigator.appName
6
Q
What is the correct JavaScript syntax for opening a new window called “w2” ?
A
w2 = window.new(“http://www.w3schools.com”);
7
Q
How to write an IF statement in JavaScript?
A
if (i == 5)
8
Q
What is the correct syntax for referring to an external script called “index.js”?
A
<script> </script>