how to write an if statement in javascript to check the given variable is the same string among others code example
Example 1: if string javascript
if (typeof myVar === 'string') { /* code */ };
Example 2: javascript if and statement
let a = 1;
let b = 2;
if(a == 1 && b ==2){
// Code here
}