In JavaScript, the operator = is used to assign values to variables, while the operator == is used to compare two variables regardless of their datatype. When comparing two variables, === is used, but this time it will check strict type, which means it will check datatype and compare two values.