conditional operator in javascript w3schools code example

Example 1: less than or equal to javascript

if(a <= 5){
   yourFunction();
}

Example 2: examples of Conditional Operator js

var age = 19;
var canDrive = age > 16 ? 'yes' : 'no';

Example 3: js !==

var x = 5;

// === 	equal value and equal type
// e.g. 1. 
x === 5 returns true

// e.g. 2.
x === "5" returns false

// !== not equal value or not equal type
// e.g. 1.
x !== 5 returns false

// e.g. 2.
x !== "5" returns true

// e.g. 3.
x !== 8 returns true