Special Operators

This section explains the syntax, parameters, and descriptions for the special operators used in JavaScript, which are listed in the following table

OperatorDescription

?: (Conditional operator)

Lets you perform a simple “if...then...else”

, (comma operator)

Evaluates two expressions and returns the result of the second expression.

delete

Lets you delete an object property or an element at a specified index in an array.

new

Lets you create an instance of a user-defined object type or of one of the built-in object types.

this

Keyword that you can use to refer to the current object.

typeof

Returns a string indicating the type of the unevaluated operand.

void

Specifies an expression to be evaluated without returning a value.