• ¿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 11 páginas
Examen

Javascript Practice Exam 2 Testing Questions And Answers

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

JAVASCRIPT PRACTICE EXAM 2 TESTING QUESTIONS AND ANSWERS

Vista previa del contenido

JAVASCRIPT PRACTICE EXAM 2
TESTING QUESTIONS AND ANSWERS

You have a line of code in a webpage and want to make sure it displays only
if the browser a user is using does not support JavaScript.



Using drag and drop, drag the correct set of tags into the missing areas. Not
all tags will be used. - ANSWER-<noscript>

This browser does not support JavaScript.

</noscript>

For each statement regarding the use of external scripts, select Yes if the
statement is true or No if the statement is false. - ANSWER-External scripts
increase overall code security for websites. YES



If a variable is declared in both an inline script and an external script, the
inline script always takes precedence. NO



External scripts do not not need script tags within them. YES

A new developer is using the Console window within a browser to test code
for a new web app. The developer wants to be able to pause the code from
running to test the validity of variables within the code. Which methods can
the developer use to pause code as necessary? (Choose two) - ANSWER-add
a breakpoint



add the code word, debugger

Evaluate the following code:

rate = 5.99 document.getElementById("results").innerHTML =

parseInt("22 23") +

, parseFloat(" 25.99 is the price") +

parseInt(" The cat is 10") +

rate.toFixed(1);

What is the output of the code? - ANSWER-22 25.99 NaN 6.0

On a webpage that is used as a reporting page for your site, you are
attempting to display how many times the productList class is being used,
with the number of times the class is used to be displayed in a paragraph
with an ID of productListOutput.



Using the dropdown arrows, complete the function with the correct lines of
code. - ANSWER-var classList = document.getElementsByClassName



document.getElementById('productListOutput').innerHTML

You are writing code to generate a random number of 0, 1, or 2 so that a
song can be played based on the number generated.



Using drag and drop, fill in the variable declaration for the songNumber
variable. - ANSWER-Math.floor



Math.random



3

In the following code example, use the dropdown lists to complete the code
so that it will do the following:



Attempt to display an order total.



Display the message "You have a problem" and the error message if there is
an error.

Información del documento

Subido en
1 de noviembre de 2025
Número de páginas
11
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$13.99

¿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.
EduSprint
3.9
(8)
Vendido
70
Seguidores
5
Artículos
7078
Ú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