One, two or three strokes, and the count decides whether you are assigning, comparing loosely, or comparing strictly.
Count the horizontal strokes. One assigns a value. Two compare after converting types, which is where surprising results come from. Three compare without converting, so a string and a number are never equal. Miscounting is among the most common mistakes made by people new to the language, and nothing in the shape warns you.
One equals sign assigns, two compare with type conversion, three compare without. The count of strokes is the whole of the difference.
Drawn from the visual attributes recorded for each symbol. Only traits the two records disagree about are listed.
| Trait | Equals sign | Strict equality operator |
|---|---|---|
| Orientation | orientation independent | upright |
| Equals sign | Strict equality operator | |
|---|---|---|
| Number of strokes | One (or two in a comparison) | Three |
| What it does | Assigns, or compares with type conversion | Compares without type conversion |
| "1" against 1 | Equal under the two-stroke form | Not equal |
| Usual style guidance | Avoid the two-stroke comparison | Prefer this |
| Relationship (from Symbolwise's records) | Commonly confused with Strict equality operator — One equals sign assigns, two compare with type conversion, three compare without. The count of strokes is the whole of the difference. | Commonly confused with Equals sign — One equals sign assigns, two compare with conversion, three compare without. The count is the whole of the difference. |
Robert Recorde (1510–1558) — Biography
MacTutor History of Mathematics, University of St Andrews · retrieved 2026-07-26
ECMA-262, ECMAScript Language Specification
Ecma International · retrieved 2026-08-01
Authoritative for JavaScript's own syntax and only for that. A construct spelled the same way in another language may behave differently, and records say which language they are describing.
Wikipedia · retrieved 2026-08-01
Tertiary reference. Used for widely-agreed identity, origin and current use, not for contested detail or exact dates.
Two short parallel lines. Between atoms in a structural formula they are a double bond — two shared electron pairs. Between quantities they assert equality. There is no visual difference at all, and none is needed, because the two never appear in the same expression.
Between two quantities, two level strokes assert that they are equal. Enclosed in a circle on a licensed work, the same two strokes are the no-derivatives condition: the work may be shared, but modified versions may not be distributed. Adapting it privately is not restricted — the condition is about sharing the result.
Alpha is a Greek letter and stands for a quantity — an angle, a coefficient, a significance level. The proportionality sign is an operator and stands between two quantities to say they keep a constant ratio. The drawings differ in that the proportionality sign's right-hand stroke runs out in an open curve rather than closing into the letter's tail.
Look at the left-hand edge. A straight flat back is an AND gate: the output is true only when every input is. A curved concave back is an OR gate: true when any input is. Everything else about the shapes is similar, which is why the back edge is worth checking deliberately rather than at a glance.