0

Hello! Can anyone tell me the difference between "=" and "==" assignments?

9th Dec 2018, 3:44 AM
Meylis
2 Answers
+ 4
"==" is not an assignment I think. "==" means "is equal to" so you can use it whenever you need to check if a value is equal to another value (e.g. num1==num2) this checks if num1 is equal to num2. While "=" is an assignment. It is use to assign a value to your variable. (e.g. num=12;)
9th Dec 2018, 4:02 AM
MDJ_
MDJ_ - avatar
+ 3
= assigns value to a data. == compares two data.
9th Dec 2018, 2:36 PM
Incognito
Incognito - avatar