6 kyu

T.T.T.61: Alien's magic

55 of 81myjinxin2015

Description:

Description

Some aliens are hiding in codewars. They have a magic that can change the time and space. The name of this magic is called lalala. The aliens will spell out the magic spell lalala, all the time and space of the object will be changed.

Example 1:

things=[
"In the afternoon, John had dinner at the restaurant.",
"At noon, Tom stool in the toilet."
]
lalala(things) === 
[
"At noon, John had dinner in the toilet.",
"In the afternoon, Tom stool at the restaurant."
]

Example 2:
things=[
"In the afternoon, John had dinner at the restaurant.",
"At noon, Tom stool in the toilet.",
"At 10 in the evening, Anne dancing pole dance in the bar."
]
lalala(things) === 
[
"At noon, John had dinner in the toilet.",
"At 10 in the evening, Tom stool in the bar.",
"In the afternoon, Anne dancing pole dance at the restaurant."
]

As you can see, the order of the change of time and space is:

first --> last
second --> first
third --> second
and so on...

Task

Complete function lalala that accepts a argument things, returns the result in accordance with the above rules. You can assume that things is an array containing at least two string elements.

Puzzles
Games

Similar Kata:

Stats:

CreatedSep 26, 2016
PublishedSep 26, 2016
Warriors Trained307
Total Skips7
Total Code Submissions835
Total Times Completed81
JavaScript Completions55
Python Completions33
Total Stars4
% of votes with a positive feedback rating89% of 31
Total "Very Satisfied" Votes24
Total "Somewhat Satisfied" Votes7
Total "Not Satisfied" Votes0
Total Rank Assessments5
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • myjinxin2015 Avatar
  • kazk Avatar
  • Voile Avatar
  • saudiGuy Avatar
Ad