Operators and Functions Flashcards
Increment and decrement unary operators can be used [..] and [..]
Prefix and postfix
Using [..] on an array replaces the value with ‘undefined’, leaving the index in place
Delete
What is the most succinct way of finding the minimum number in an array?
Math.min.apply(null, arr)
Higher order functions allow us to abstract over [..], not just values
Actions
Second element in a regex/string match object
The first matched group
The shorter way to create a function binding is a function [..]
Declaration ( function square(x) { return x*x; } )
If an expression corresponds to a sentence fragment, then a [..] corresponds to a sentence.
Statement
Postfix operators return the value [..] operating
Before
Functions that automatically (when g or y modifiers are enabled) resets the lastIndex regex object property to 0 after a failure to match
test() and exec()
Bindings declared with ‘let’ and ‘const’ are local to the [..] that they are declared in.
Block
Array method that returns the index of the element matching the argument.
indexOf()
Syntax for rest parameters or spread operator
…
Function [..]s can be declared anywhere
Declaration
Methods usually act on the [..] they are a property of
Value
Bitwise not, which inverts all the bits in the operand and returns a number…
~
A function [..] is a regular binding where the value of the binding is a function.
Declaration
[..] are functions that live in properties
Methods
An [..] is a symbol/sign that maps [..] to output values
Operator
Operandi
If you try to destructure [..] or [..] you will get an error
Null
Undefined
Date object convention - day numbers start at
1
Delete does not work on any [..]
Non-configurable properties
Regex (or string) method that returns a match object
Exec
A fragment of code that produces a value is called an [..]
Expression
What is the Regexp string replacement method in JS?
replace
Every value in JS has a [..] that determines its role
Type
Delete works on functions which are part of an [..] (apart from the global scope)
Object
Unary operators cannot be [..]
Overridden
Most values have properties, but not [..] and [..]
Null
Undefined
If you omit a [..], the next line will be treated as part of the current statement.
Semi-colon
This operator converts to Boolean and then negates it
!