HTML & CSS Tutorial 9 Review

¡Supera tus tareas y exámenes ahora con Quizwiz!

To insert the comment "Countdown clock" into a JavaScript program, enter:

/* Countdown clock */

A location in the script where the browser will pause the program is created with an:

Breakpoint

Which command declares the variable totalMonths with an initial value of 12?

ar totalMonths = 12;

To display the message "Happy New Year!", enter the JavaScript command:

window.alert("Happy New Year!")

JavaScript code is used to create a:

client-side application

Which expression references an element with the ID sidebar?

document.getElementById("sidebar")

Which expression references all paragraph elements in the document?

document.getElementsByTagName("p")

Variables that can be referenced only within the function in which they are created have:

local scope

Which command creates a Date object for the date April 4, 2021 at 8:38:14 a.m.?

new Date("April 4, 2021 8:38:14");

Which of the following is a type of JavaScript object?

rowser objects contained within the browser itself, document objects contained with the web page

To attach a JavaScript program to an HTML file, use the:

script element

Which command runs the init() function once every 5 seconds?

setInterval("init()", 5000);

Which command runs the init() function after a 5-second delay?

setTimeout("init()", 5000);

The HTML code stored within a page element is referenced with the property:

textContent

With deferred loading, the program is not loaded until:

the page has been parsed and loaded

The command to increase the value of the thisDay variable by 1, using the increment operator is:

thisDay++

The area of a circle is πr2 where r is the circle's radius. Which JavaScript expression returns a circle's area where the radius has been stored in a variable named radius?

Math.PI*Math.pow(radius, 2)

Which expression returns the value of dailyIncome, rounded up to the next highest integer?

Math.ceil(dailyIncome)

Which expression extracts the hours value from the expDate variable?

expDate.getHours()

Rewrite the following command using an assignment operator: income = income - taxes;

income -= taxes

The HTML code stored within a page element is referenced with the property:

innerHTML

What statement should be added to a JavaScript file to ensure that the code is strictly interpreted?

"use strict";

What will be the result of running the following JavaScript command? WINDOW.ALERT("Page Loaded");

Nothing because the code uses improper syntax

Which command calls the calcCirArea() function using a value of 15 for the circle's radius and storing the result in a variable named finalArea?

finalArea = calcCirArea(15);


Conjuntos de estudio relacionados

Operations Management Exam 2 Study Guide

View Set

Chapter 27: Dictatorships and the Second World War

View Set

Chapter 12+ 13 guided questions 153 questions

View Set