Chapter 2 - Functions, Data Types and Operators

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

browser console

a browser pane that displays error messages.

Boolean value

a logical value of true or false

floating-point number

a number that contains decimal places or that is written in exponential notation.

integer

a positive or negative number with no decimal places.

textContent property

a property similar to the innerHTML property, except that its value excludes any HTML markup.

function

a related group of JavaScript statements that are executed as a single unit.

named function

a set of related statements that is assigned a name.

anonymous function

a set of related statements with no name assigned to it.

exponential notation

a shortened format for writing very large numbers or numbers with many decimal places, in which numbers are represented by a value between 1 and 10 multiplied by 10 raised to some power.

return statement

a statement in a function that returns a value to the statement that called the function.

local variable

a variable that is declared inside a function and is available only within the function in which it is declared, because it has local scope.

global variable

a variable that is declared outside a function and is available to all parts of your program, because it has global scope.

parameter

a variable that is used within a function.

empty string

a zero-length string value.

truthy values

all values other than the six falsy values; truthy values are treated in comparison operation as the Boolean value true.

postfix operator

an operator that is placed after a variable name.

prefix operator

an operator that is placed before a variable name.

binary operator

an operator that requires an operand before and after it.

unary operator

an operator that requires just a single operand either before or after it.

assignment operator

an operator used for assigning a value to a variable.

comparison operator

an operator used to compare two operands and determine if one value is greater than another.

compound assignment operators

assignment operators other than the equal sign, which perform mathematical calculations on variables and literal values in an expression, and then assign a new value to the left operand.

primitive types

data types that can be assigned only a single value.

loosely typed

description of a programming language that does not require you to declare the data types of variables.

strongly typed

description of a programming language that requires you to declare the data types of variables.

arithmetic operators

operators used to perform mathematical calculations, such as addition, subtraction, multiplication, and division.

passing arguments

sending arguments to the parameters of a called function.

false values

six values that are treated in comparison operations as the Boolean value false.

adding an event listener

specifying an event handler with the addEventListener() method.

conditional operator

the ?: operator, which executes one of two expressions based on the results of a conditional expression.

logical operators

the Or (||), And (&&), and Not (!) operators, which are used to modify Boolean values or specify the relationship between operands in an expression that results in a Boolean value.

variable scope

the aspect of a declared variable that determines where in code it can be used, either globally (throughout the code) or locally (only within the function in which it is declared).

escape character

the backslash character ( \ ), which tells JavaScript compilers and interpreters thtat the character that follows it has a special purpose

function call

the code that calls a function, which consists of the function name followed by parentheses, which contain any arguments to be passed to the function.

escape sequence

the combination of the escape character ( \ ) with one of several other characters, which inserts a special character into a string; for example, the \b escape sequence inserts a backspace character.

function definition

the lines that make up a function.

associativity

the order in which operators of equal precedence execute.

concatenation operator

the plus sign (+) when used with strings; this operator combines, or concatenates, string operands.

innerHTML property

the property of a web page object whose value is the content between the element's opening and closing tags.

function braces

the set of curly braces that contain the function statements in a function definition.

data type

the specific category of information that a variable contains, such as numeric, Boolean, or string.

function statements

the statements that do the actual work of a function, such as calculating the square root of the parameter, or displaying a message on the scree, and which must be contained within the function braces.

operator precedence

the system that determines the order in which operations in an expression are evaluated.

arguments

the variables or values that you place in the parentheses of a function call statement.

call

to invoke a function from elsewhere in your code.


Ensembles d'études connexes

Financial Accounting Chapter 3 Key Concepts

View Set

Chapter 1 Assignment: An Overview of Financial Management

View Set

FRIDAY (1/31) QUIZLET ONLY: Insight learning, cognitive map & latent learning

View Set

6 ABC-er og leseopplæringsmetoder

View Set