Array of Sunshine just makes your day a little bit better.
In this exercise you must will solve a number of challenges for manipulating and working with arrays in various ways.
-
Fork this repository to your own GitHub profile and clone to your local machine. Run
http-server
in terminal and open http://localhost:8080 in Chrome to see failing tests. Editsunshine.js
to make tests pass. -
Write a function that takes a string of characters and converts the string to an array of the individual characters, reverses the array and returns the reversed string of the original. Bonus: Use RegEx to create the array
-
Write a function that takes two parameters as input in the order of string, character. With the first string parameter use Array functionality remove the last character and put it at the beginning of the array. Then insert the character passed in the second parameter into the second to last position of the array. Then convert the array to a string and return it.
-
Using the Array map() method write a function that takes an array of strings as input and returns a duplicate array with all strings in pig latin form. (Ex. "metal" => "etalmay".) Note: For now, do not worry about words like "chicken". Instead of "ickenchay", it should just become "hickencay".