+ 4

What is the difference between == and =??

24th Apr 2017, 12:37 PM
Naseef
Naseef - avatar
4 Réponses
+ 8
== compares two expresions, if they have the same value returns true and if they are different returns false. = is the asigment operator. It takes the value of whatever is on the right and asigns it to the variable which is on the left.
24th Apr 2017, 12:43 PM
Nelson Urbina
Nelson Urbina - avatar
+ 5
= assignment == compare two variable =.,=
24th Apr 2017, 12:44 PM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 3
== is used to in if statements and returns a boolean expression and = is used to assign value to a variable.
24th Apr 2017, 12:42 PM
Vishal Prajapati
+ 1
== operator will compares the expression while = will assign the values to user defined variables
24th Apr 2017, 6:18 PM
reddy sharath
reddy sharath - avatar