diff --git a/Javascript/If_else.js b/Javascript/If_else.js index 6cfbe23..746e65c 100644 --- a/Javascript/If_else.js +++ b/Javascript/If_else.js @@ -1,5 +1,4 @@ const firstName = "Ashu"; //The firstname and gender of a person is fixed(constant) ie it cannot change so its much better to use the const variable as it then wont allow the variable value to be reassigned. const gender = "Male"; -if (gender == "Male") { - console.log("Hello, " + firstName); -} +if (gender === "Male") { + console.log("Hello, " + firstName); }