Check if two Numbers are NOT equal in JavaScript-Code Examples

Radu TM

Check if two Numbers are NOT equal in JavaScript

JavaScript by Radu TM June 21, 2022

// check if two numbers are NOT equal

if (!(num1 === num2)) {
  console.log("😎");
} else {
  console.log("😕");
}

0

21.185

Check if two Numbers are NOT equal in JavaScript

JavaScript by Radu TM June 21, 2022

if (1 !== 2) {
  console.log('🎉 The numbers are not equal!')
} else {
  console.log('😞 The numbers are equal.')
}

0

21.185

Related JavaScript Queries

Latest JavaScript Queries

Explore code examples by categories