2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -0,0 +1,12 @@
|
|||
strReversed = '---------- Ice and Fire ------------\n\n
|
||||
fire, in end will world the say Some\n
|
||||
ice. in say Some\n
|
||||
desire of tasted I\'ve what From\n
|
||||
fire. favor who those with hold I\n\n
|
||||
... elided paragraph last ...\n\n
|
||||
Frost Robert -----------------------'
|
||||
|
||||
reverseString = (s) ->
|
||||
s.split('\n').map((l) -> l.split(/\s/).reverse().join ' ').join '\n'
|
||||
|
||||
console.log reverseString(strReversed)
|
||||
Loading…
Add table
Add a link
Reference in a new issue