I'm trying to set a certain value, monsterHealth
, to display 0
instead of a negative number. If I'm trying to reassign the value to show 0
instead of, say, -2
, would I want to use =
or ==
?
Those are different operators:
=
- assignment operator, ==
and !=
- equality operators, ===
and !==
- referential equality operators. also
val
- read only variable/property (it cannot be reassigned/changed), var
- mutable variable/property.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.