Learn Ruby
Array
14.14
Lesson

Creating new array using percentage syntax

Usually we create array like this.

We can also create array using percentage syntax.

This version looks much cleaner. However if there is a whitespace in the word then we need to put a \ to escape the whitespace.