Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Javascript
Use the conditional operator in the checkEqual function to check if two numbers are equal or not. The function should return either "Equal" or "Not Equal".
I'mAnAccountantIKnowAlotOfMath
Programming language:
Javascript
2021-06-19 12:51:58
0
Q:
Use the conditional operator in the checkEqual function to check if two numbers are equal or not. The function should return either "Equal" or "Not Equal".
Fabio Turati
Code:
Javascript
2021-06-15 06:58:50
function checkEqual(a, b) { return a === b ? "Equal" : "Not Equal"; }
0
Tags
number
use
function
check
con
turn
two
return
Related
not equal to in js
javascript !=== not exactly equal
Use multiple conditional operators in the checkSign function to check if a number is positive, negative or zero. The function should return "positive", "negative" or "zero".
New to Communities?
Join the community