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

3rd Nov 2016, 6:37 AM
Akshay Naik
Akshay Naik - avatar
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
8th Nov 2016, 6:20 AM
மனோஜ்குமார் பழனிச்சாமி
மனோஜ்குமார் பழனிச்சாமி - avatar