Skip to content

Nmuta/simple-js-operations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple js operations

  1. Add the necessary code in script.js for each function
  2. Run npm test to run the tests

Problems

  1. 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']

  2. 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"]

  3. 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".

  4. Get Object Keys : Return all of the keys of any given object

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published