JavaScript Flashcards
Which keyword do you use to create a variable?
var
When a client requests a server-side script, a client will never see the server-side script, only the ____ that the web server software returns from the script.
HTML
A(n) _____ is a specific circumstance that is monitored by JavaScript and that your script can respond to in some way.
Event
Multiple lines of code that are not processed by browsers that are used to add notes about your code are called
Block comments
An object is ____ that can be treated as an individual unit or component.
programming code and data
When you assign a value to a variable, you use an equal sign, which is also called a(n) __________ operator.
assignment
____ can turn static documents into applications such as games or calculators.
JavaScript
JavaScript source files that store especially useful generic scripts used on many different websites are known as
libraries
The individual lines of code that make up a JavaScript program in a document are called
statements
A(n) ____ comment hides multiple lines of code.
block
Special words that are part of the JavaScript language syntax and that can’t be used as variable names are known as ____.
reserved words
Symbols such as + and * used in expressions to manipulate operands are known as ____.
operators
Variables and literals contained in an expression are known as ____.
operands
____ are lines of code that are not processed by browsers, which you use to add notes about your code.
comments
T/F JavaScript code is always stored in an external file separate from the HTML code for a web document.
False
____ refers to programming using a scripting language that is executed from a web server.
server-side scripting
Which method displays a dialog box with an OK button?
alert()
T/F Although JavaScript is considered a programming language, it is also a critical part of web page design and authoring.
True
When an event occurs, your script executes any code that responds to that specific event on that specific element.
This code is known as the __________.
event handler
A(n) _____ is a specific circumstance that is monitored by JavaScript and that your script can respond to in some way.
expression
Some of the more popular server-side scripting languages include
PHP, ASP.NET, and Python
Which method do you use to reference an element on a web page in a script?
getElementById()
The procedures associated with an object are called
processes
T/F. In JavaScript code, you use the words yes and no to indicate Boolean values.
False
T/F: A logical operator is used to compare two string operands for equality.
False
Programming languages that require you to declare the data types of variables are called ____ typed programming languages.
Strongly
A(n) ____ is a variable that is used within a function.
parameter
The strict equal operator is
===
Which of the following is a logical operator?
||
A literal string can be assigned a zero-length string value called a(n) ____ string.
empty
You can use an arithmetic operator to return the modulus of a calculation, which is the ____ when you divide one number by another number.
remainder left
Which arithmetic operators have the highest precedence?
- / %
A ____ variable is one that is declared outside a function and is available to all parts of your program.
global
You can use the compound ____ to combine two strings.
assignment operator
Data types that can be assigned only a single value are called ____ types.
primitive
Function statements are contained within the function ____.
braces
Which of the following is a falsie value?
-1
1
true
0
0
A(n) ____ variable is declared inside a function and is available only within the function in which it is declared.
local