QUIZ RESULTS
In which HTML element do we write the JavaScript code? |
• <javascript> | 25% | |
• <js> | 25% | |
• <script> | 25% | |
• <java_script> | 25% | |
Where is the correct place to insert a JavaScript? |
• <head> | 25% | |
• <body> | 25% | |
• both of the above | 25% | |
• none of the above | 25% | |
How do you write "Hello World" in an alert box? |
• alert("hello world") | 25% | |
• alertbox("hello world") | 25% | |
• msgbox("hello world") | 25% | |
• alert = "hello world" | 25% | |
How do you call a function named "myFunction"? |
• call myFunction() | 25% | |
• myFunction() | 25% | |
• call function myFunction() | 25% | |
• new functionCall myFunction() | 25% | |
How do you write a conditional statement for executing some code if "i" is equal to 5? |
• if i=5 then | 25% | |
• if i==5 then | 25% | |
• if(i==5) | 25% | |
• if(i=5) | 25% | |
An external JavaScript must contain the <script> tag? |
• yes | 50% | |
• no | 50% | |
How can you add a comment in a JavaScript? |
• <!-- This is a comment --> | 25% | |
• //This is a comment | 25% | |
• 'This is a comment | 25% | |
• "This is a comment | 25% | |
Click here to return to the main page