Difference Between == and === in JavaScript

In JavaScript, == and === are comparison operators, but they work differently:

Consider the following examples:


        console.log("2" == 2);  // Output: true
        console.log("2" === 2); // Output: false
    

Explanation: