Operators in JavaScript (OCR A-Level Computer Science): Flashcards
📚Flashcards
Practise the cards
9 cards from this deck
ShowHide
Practise the cards
9 cards from this deck
Purpose of JS operators
Purpose of JS operators
Data manipulation and decision-making
Categories of JS operators
Categories of JS operators
Arithmetic, assignment, comparison, logical
JS arithmetic operators
JS arithmetic operators
+, -, *, /, %
JS comparison operators
JS comparison operators
==, ===, !=, <, >
JS logical operators
JS logical operators
&&, ||, !
What === checks
What === checks
Both value and type
Common mistake with == and ===
Common mistake with == and ===
Confusing == (value only) with === (value + type)
Difference: === vs ==
Difference: === vs ==
=== checks value + type; == checks only value
How to avoid operator errors
How to avoid operator errors
Use appropriate operator; practise logical & comparison ones
