0
What is the difference = and ==
4 Answers
+ 5
= for assigning the value.
== for checking the condition.
+ 3
Aditya Adiga
You did not mention the language which you are referring to.
In JavaScript there is also the operator ===. It compares whether two values are equal and of the same type.
0
//Examples:
let x = 5;
let y = 6;
let z = â5â;
console.log(x==z)//outputs true because they have the same value
console.log(y==z)//outputs false because they donât have the same value
console.log(x===z)//outputs false because they have the same value, but not the same type
0
Search before ask question
https://www.sololearn.com/discuss/175186/?ref=app
https://www.sololearn.com/discuss/1171728/?ref=app
https://www.sololearn.com/discuss/376644/?ref=app
https://www.sololearn.com/discuss/163136/?ref=app
https://www.sololearn.com/discuss/842952/?ref=app
https://www.sololearn.com/discuss/359841/?ref=app
https://www.sololearn.com/discuss/523921/?ref=app
https://www.sololearn.com/discuss/1633567/?ref=app
https://www.sololearn.com/discuss/1213035/?ref=app
https://www.sololearn.com/discuss/563410/?ref=app
https://www.sololearn.com/discuss/2655796/?ref=app
https://www.sololearn.com/discuss/1946400/?ref=app