0
Ruby - What does %w operator do?
3 odpowiedzi
+ 4
Its a literal, it allows you to create array of strings wirh no commas and quotes in syntax.
Example:
array= ['ggg', 'gdtg']
Or
array =%w[ggg gdtg]
It justs helps in syntax.
+ 1
I know this use, but it's not used exclusively with arrays
+ 1
Paolo De Nictolis yes indeed.