Range:
ex:
('A'..'Z')
it is the range between 'A' and 'Z'
change range to array
ex: ('A'..'Z').to_a
check if something is in the range
ex: ('A'..'Z').include?('R')
Symbol:
ex: :good
: + name = symbol
it is more efficient than object
Usage: varying data as object, fixed data as symbol
沒有留言:
張貼留言