Operators
Less than (<)
Tests whether the left operand precedes the right operand. Two strings compare lexicographically by UTF-16 code units; numeric comparisons use magnitude. NaN makes the result false.
Formal Syntax & Structure
javascript syntaxjavascript
left < rightParameters & Attributes
| Name | Type | Description |
|---|---|---|
| left | expression | Left operand. |
| right | expression | Right operand; short-circuiting may skip evaluation where applicable. |
Return Value
Boolean
Result of the operation.
Working Example
Example Snippetjavascript
console.log("20" < "3");