Javascript Final Exam Revision: 50 Question with Complete and Verified Solutions
1.Inside which HTML element do we put the JavaScript? a) <javascript> b) <js> c) <script> d) <scripting> - c) <script> 2. What is the correct JavaScript syntax to write "Hello World"? a) ("Hello World") b) "Hello World" c) ("Hello World") d) ("Hello World") - c) ("Hello World") 3. Where is the correct place to insert a JavaScript? a) Both the <head> section and the <body> section are correct b) The <body> section c) The <head> section - a) Both the <head> section and the <body> section are correct 4. What is the correct syntax for referring to an external script called ""? a) <script src=""> b) <script name=""> c) <script href=""> d) <script value=""> - a) <script src=""> 5. An external JavaScript must contain the <script> tag a) False b) True - a) False 6. How do you write "Hello World" in an alert box? a) alert("Hello World") b) msgBox("Hello World") c) alertBox="Hello World" d) alertBox("Hello World") - a) alert("Hello World") 7. How do you create a function? a) function:myFunction() b) function=myFunction() c) function myFunction() d) myFunction():function - c) function myFunction() 8. How do you call a function named "myFunction"? a) call myFunction() b) myFunction() c) call function myFunction d) CFunction() - b) myFunction() 9. How do you write a conditional statement for executing some statements only if "i" is equal to 5? a) if i==5 then b) if (i==5) c) if i=5 then d) if i=5 - b) if (i==5) 10. How do you write a conditional statement for executing some statements only if "i" is NOT equal to 5? a) if (i != 5) b) if =! 5 then c) if (i <> 5) d) if <>5 - a) if (i != 5) 11. How many looping statements are there in JavaScript? a) 2. The "for" loop, and the "while" loop b) 4. The "for" loop, the "while" loop, the "do...while" loop, a
Escuela, estudio y materia
- Institución
- Javascript
- Grado
- Javascript
Información del documento
- Subido en
- 10 de junio de 2024
- Número de páginas
- 12
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas
Temas
-
javascript final exam revision 50 question with