You can write an IF statement in JavaScript to execute some code if "i" is NOT equal to 5 using the following syntax:
if (i !== 5) {
// Code to be executed if "i" is NOT equal to 5
}
javascript复制成功复制代码
In this statement, the code inside the curly braces will only be executed if the value of "i" is not equal to 5.