• ¿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 Practice Exam 1 Testing Mode Questions With Correct Answers | Latest Update

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

JAVASCRIPT PRACTICE EXAM 1 TESTING MODE QUESTIONS WITH CORRECT ANSWERS | LATEST UPDATE

Vista previa del contenido

JAVASCRIPT PRACTICE EXAM 1:
TESTING MODE



You have entered the following code into a webpage: <script> function incQty (field)
{ var qty document.getElementById(field).value; qty ++
document.getElementById(field).value qty; } function decQty (field) { qty
document.getElementById(field).value } qt - Correct Answers -Move the qty variable
above the incQty function

Declare the qty variable in the decQty function

You are building a website for a fitness company. You need to display a list of program
dates based on a start date and an end date. You need to build a loop that adds each
date to a bulleted list inside of an element called programList. The start and end dates
are seven days apart, and you need to show all dates in between the start and end
dates. The start date should always display. Using drag and drop, drag over the correct
code snippets in the proper order to build a loop of dates. Any needed variables have
already been declared. Not all options will be used. - Correct Answers -line 1
do {

line 2
document.getElement Byld("programList").in nerHTML += "<li>" + programDate + "
</li>";

line 3
programDate.setDate( programDate.getDate(( ) + 2);

line 4
}

line 5
while (programDate < programEndDate)

You are trying to fill a variable called activity with an activity based on the weather. The
activity to do will be based on the following scenarios: If it is at least 70 degrees and the
weather is clear, the activity will be golf. If it is less than 50 degrees or the weather is
not clear, the activity will be bowling. Otherwise, the activity is hiking. Drag the correct
operators into the missing code slots to finish building this code example. Not every
operator will be used. - Correct Answers -1)>=

, 2)&&
3)==
4)<
5)||
6)!=

You want to store a list of locations in an array, sorted in alphabetical order. You also
want an empty array for new locations, with the intention that the array is filled in with
new locations as needed. Using the dropdown lists, fill in the proper code to declare
both a filled array to the variable, locations, and an empty array to the variable
newLocations. Then, add the code for alphabetizing the locations array before it is
displayed and fill in the code that will make HQ the first element in the array. Finally,
add the code necessary to assign the number of elements in the array to the variable
numberOfLocations. Use the comments to help guide you as to where to add code for
each task. - Correct Answers -[
[]
sort()
[0]
Length

A math expert knows that the area of a circle is PI * the radius squared. However, that
math expert does not know how to code that formula in JavaScript. Using the dropdown
list, fill in the missing code to complete this calculation. - Correct Answers -Math.PI *
Math.pow(radius, 2);

The following code example is almost complete. It just needs comment marks applied to
the areas designated as comments. Using the dropdown arrows, add the correct
comment symbols to finish this code. - Correct Answers -//
/*
*/

You have an external JavaScript file called calculations, located in the scripts folder.
Using the dropdown arrow, insert the proper reference to the script within the head
section of the code example. - Correct Answers -<script src="scripts/calculations.js">
</script>

For each proposed variable name, select Yes if the variable name is permissible in
JavaScript or No if it is not. - Correct Answers -alert Msg NO
$alertmsg YES
alertmsg YES
alert NO
alert_msg YES

As part of a car webpage, a developer is building cars as objects. Each car has multiple
properties. Using the dropdown arrows, fill in the code pieces necessary to build an

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