decrementProperty (keyName, decrement) Numberpublic
Set the value of a property to the current value minus some amount.
player.decrementProperty('lives');
orc.decrementProperty('health', 5);
Parameters:
-
keyName
String - The name of the property to decrement
-
decrement
Number - The amount to decrement by. Defaults to 1
Returns:
-
Number - The new property value
Please login to continue.