0
Ruby Variable name
What happens when we write - before variable name e.g. -var="Hello world" puts var # Hello world puts -var # -Hello world What is actually happening here? How Ruby treat - sign
1 Réponse
+ 1
-var="Hello world" here - does not change anything
puts var # Hello world
puts -var # Hello world here - does not change anything
-var=5 here - does not change anything
puts var # 5
puts -var # -5 here -change the sign