how to compare two strings in javascript if condition
var string1 = "Hello World";
var string2 = "Hello world.";
if (string1 === string2) {
console.log("Matching strings!");
}
else {
console.log("Strings do not match");
}
how to compare two strings in javascript if condition
var string1 = "Hello World";
var string2 = "Hello world.";
if (string1 === string2) {
console.log("Matching strings!");
}
else {
console.log("Strings do not match");
}
Javascript comparison
const num1 = 450;
const num2 = 350;
const num3 = 1000;
if (num1 > num2 && num1 > num3) {
console.log("num1 is bigger then num2 and num3");
} else if (num2 > num1 && num2 > num3) {
console.log("num2 is bigger num1 and num3");
} else {
console.log("num3 is bigger then num1 and num2");
}
//Output: num3 is bigger then num1 and num2
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us