Javascript Operators

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

A non-numeric string converts...

A _______ converts to NaN which is always false.

An empty string converts to...

An _______ converts to 0.

logical operators

Logical operators are used to determine the logic between variables or values.

string operators

The + operator can also be used to add (concatenate) strings. The += assignment operator can also be used to add (concatenate) strings.

=

The assignment operator (=) assigns a value to a variable.

+stringName

The shorthand syntax for converting stringName from a string into a number is _______ .

comparing two strings

When _______ , "2" will be greater than "12", because (alphabetically) 1 is less than 2.

comparing a string with a number

When _______ , JavaScript will convert the string to a number when doing the comparison. 2 < "12" = true

concatenation operator

When used on strings, the + operator is called the _______ .

comparison operators

_______ are used in logical statements to determine equality or difference between variables or values to test for true or false.

arithmetic operators

_______ are used to perform arithmetic on numbers:

assignment operators

_______ assign values to JavaScript variables.

conditional (ternary) operator

_______ is a conditional operator that assigns a value to a variable based on some condition. variablename = (condition) ? value1:value2

+=

compound assignment with addition myVar += 5 is the same as... myVar = myVar + 5

/=

compound assignment with division myVar /= 5 is the same as... myVar = myVar / 5

*=

compound assignment with multiplication myVar *= 5 is the same as... myVar = myVar * 5

-=

compound assignment with subtraction myVar -= 5 is the same as... myVar = myVar - 5

bitwise operators

used to manipulate individual bits of values.


Kaugnay na mga set ng pag-aaral

Symbols for Categorical and Quantitative Variables

View Set

HESI Case Study - Hip Fracture and Cellulitis

View Set

Indian History, From Shastri to Gandhi (16).

View Set

Biology 102 chapter#1 (Michelle)

View Set

Test Out Linux Pro 3.3.4 Practice Questions

View Set

chapter 20: Patients with hematologic disorders

View Set