Ruby is case-sensitive : Ruby Interpreter « Language Basics « Ruby






Ruby is case-sensitive


numOfCoins = 6 
NumOfCoins = 10 
print "NumOfCoins: ", NumOfCoins, "\n" 
print "numOfCoins: ", numOfCoins, "\n" 


numOfCoins = numOfCoins + 1 
numOfCoins += 1 
print "After two increments, numOfCoins is ", 

numOfCoins, "\n" 

NumOfCoins = 24 
print "After reassignment, NumOfCoins is ", 
NumOfCoins, "\n" 

 








Related examples in the same category

1.Ruby Interpreter option list
2.operators are actually implemented as method calls
3.A Simple Ruby Program
4.Explicitly extend a statement onto the next line with a backslash