- Add the necessary code in
script.js
for each function - Run
npm test
to run the tests
-
String to Array: convert a sentence into an array where every words is a separate value in the array. Example: "Watch me nae nae" should convert to ['watch', 'me', 'nae', 'nae']
-
Swap in place : Write a function that takes an array and 2 indices and swaps the two elements at their respective place values. Example: swapInPlace(["quick", "brown", "fox", "jumps"], 1,3) should return ["quick", "jumps", "fox", "brown"]
-
Array to String: It converts and array to a string while inserting special characters Example: arrayToString(["wash", "rinse", "repeat"], ", ") should convert to "wash, rinse, repeat".
-
Get Object Keys : Return all of the keys of any given object