Answers for "difference between == and is"

1

difference between == and ===

var a = 23;
var b = "23";

a == b // true (Equalit without type check)

a === b // false (Equality with type check)
Posted by: Guest on August-26-2020
0

difference between == and is

string = "69"
integer = 69

print(string is integer) # Prints False, as the values are the same but NOT the datatypes
print(string == integer) # Prints False, as the values are the same (a type check is not performed with ==)
Posted by: Guest on February-02-2022

Code answers related to "difference between == and is"

Python Answers by Framework

Browse Popular Code Answers by Language