javscript if 1 = 1 code example
Example 1: javascript compare number to string
let string = "1";
let number = 1;
if (parseInt(string) === number){
// STRING AND NUMBER MATCHES
}
if (string == number){
// STRING AND NUMBER MATCHES ALSO BECAUSE == instead of ===, means it won't compare datasets, only the content
}
Example 2: javascript if and statement
let a = 1;
let b = 2;
if(a == 1 && b ==2){
// Code here
}