1️⃣

3.1 Relational Operators

3.1 Relational Operators

What Are Relational Operators?

These operators all you to compare values of different types (not just numbers).
Using these operators, we can create "conditions". A condition is a statement that evaluates to either true or false.

Examples

The following demonstrates how comparison operators perform different tasks.
// these are the operands let a = 5, b = 10, c = "5"; let x = a; a == c; // true a === c; // false a == x; // true a != b; // true a > b; // false a < b; // true a >= b; // false a <= b; // true a >= c; // true a <= c; // true

Next Section

2️⃣
3.2 Logical Operators
 
⚖️
Copyright © 2021 Code 4 Tomorrow. All rights reserved. The code in this course is licensed under the MIT License. If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact classes@code4tomorrow.org for inquiries.