JavaScript basics review

JavaScript basics review

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

to declare a variable, you code the keyword________ followed by the name of the variable.

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (20)

Section 1

(20 cards)

to declare a variable, you code the keyword________ followed by the name of the variable.

Front

var

Back

In the code that follows, the window is a/an_____________ window.prompt( "Enter your name");

Front

object

Back

to provide JavaScript in the body of an HTML document, you code an HTML ________________ element that contains the JavaScript.

Front

<script>

Back

the following is a valid statement for declaring and initializing a variable named length to a starting value of 120.

Front

var length = 120;

Back

to display string or numeric data in a dialog box, you use the JavaScript_____________method.

Front

alert

Back

the order of precedence for arithmetic expressions causes

Front

multiplication operations to be performed before addition operations.

Back

an identifier in JavaScript cannot contain _____________words.

Front

reserved

Back

you use the_______ escape sequence to start a new line in a string variable.

Front


Back

to provide JavaScript for an HTML document,, you use a script element in the head section of the document that either includes embedded JavaScript or refers to a/an _________JavaScript file.

Front

external

Back

var firstName = "Ray", lastName = "Harris"; var fullName = lastName; fullName += ", "; fullName += firstName; runs

Front

fullName="Harris, Ray";

Back

In a simple assignment statement, you use the __________operator.

Front

equals

Back

if you want to store a true or false value in a variable, you use the___________ data type.

Front

boolean

Back

A JavaScript method Identifier can start with a number.

Front

false

Back

If an arithmetic expression isn't evaluated the way you want it to be due to the order of precedence, you can override that order by using ____________.

Front

parenthesis

Back

Assume the userName equals "Tom" and the userAge equals 22. What is displayed in a dialog box when the following state is executed? alert(userAge + "
is" + userName + " 's age.");

Front

22 is Tom's age.

Back

When you "comment out" JavaScript code, the code___________ when the page is tested.

Front

ignored

Back

A JavaScript statement ends with a/an __________

Front

semicolon

Back

in the code that follows, prompt is a/an ____________. window.prompt("enter your name");

Front

method

Back

in a web browser, the _______________ object is the object that's always available to JavaScript so you don't have to code its name when you call one of its methods.

Front

window

Back

if possible the parseInt method converts the string that's passed to it to a/an___________.

Front

integer

Back