Javascript - Write program to compare string value in if statement

Requirements

Write program to compare string value in if statement

Change the value of the variable firstName to make the if statement run.

var firstName = "";

if (firstName === "John") {
    console.log( "Hello John!" );
}

Hint

The value of firstName must match the condition in the if statement.

Demo

var firstName = "John";

if (firstName === "John") {
    console.log( "Hello John!" );
}

Result