• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 8 páginas
Examen

Javascript Quiz With Complete Solutions

Document preview thumbnail
Vista previa 2 fuera de 8 páginas

JAVASCRIPT QUIZ WITH COMPLETE SOLUTIONS

Vista previa del contenido

JAVASCRIPT QUIZ WITH COMPLETE
SOLUTIONS



1.Inside which HTML element do we put the JavaScript?
a) <javascript>
b) <js>
c) <script>
d) <scripting> - Correct Answers -c) <script>

2. What is the correct JavaScript syntax to write "Hello World"?
a) response.write("Hello World")
b) "Hello World"
c) document.write("Hello World")
d) ("Hello World") - Correct Answers -c) document.write("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 - Correct Answers -a) Both the <head> section and the <body>
section are correct

4. What is the correct syntax for referring to an external script called "xxx.js"?
a) <script src="xxx.js">
b) <script name="xxx.js">
c) <script href="xxx.js">
d) <script value="xxx.js"> - Correct Answers -a) <script src="xxx.js">

5. An external JavaScript must contain the <script> tag
a) False
b) True - Correct Answers -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") - Correct Answers -a) alert("Hello World")

7. How do you create a function?
a) function:myFunction()

, b) function=myFunction()
c) function myFunction()
d) myFunction():function - Correct Answers -c) function myFunction()
38. In JavaScript, what would be the proper form of address in the object hierarchy for
the second element in a form called "info"?
a) document.info.elements[1]
b) document.info.elements[2]
c) document.forms.info.elements[2]
d) info.elements[2] - Correct Answers -a) document.info.elements[1]

39. A named element in a JavaScript program that is used to store and retrieve data is a
_____.
a) Method
b) assignment operator
c) Variable
d) string - Correct Answers -c) Variable

40. Which of the following is not true
a) CSS is tightly integrated with the HTML structure.
b) CSS is part of dynamic HTML.
c) CSS stand for cascading style sheet.
d) CSS is for design control of the Web page appearance. - Correct Answers -a) CSS is
tightly integrated with the HTML structure.

8. How do you call a function named "myFunction"?
a) call myFunction()
b) myFunction()
c) call function myFunction
d) Call.myFunction() - Correct Answers -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 - Correct Answers -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 - Correct Answers -a) if (i != 5)

11. How many looping statements are there in JavaScript?
a) 2. The "for" loop, and the "while" loop

Información del documento

Subido en
29 de octubre de 2025
Número de páginas
8
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$13.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
millyphilip
3.7
(562)
Vendido
3013
Seguidores
1964
Artículos
47782
Última venta
1 día hace




Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes