Skip to content

DIPA2410/Simple-JavaScript-Program

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Write a simple JavaScript program to join all elements of the following array into a string.

  1. Sample array : myColor = ["Red", "Green", "White", "Black"]; Expected Output : "Red,Green,White,Black" "Red,Green,White,Black" "Red+Green+White+Black"

  2. Sample array : var arr1=[3, 'a', 'a', 'a', 2, 3, 'a', 3, 'a', 2, 4, 9, 3]; Sample Output : a ( 5 times )

  3. Test Data : console.log(truncateString("Robin Singh",4)); OUTPUT: "Robi"

  4. Test Data : console.log(capitalizeWords('js string exercises')); OUTPUT: "Js String Exercises"

  5. e.g arrBetween(3, 8, [1, 5, 95, 0, 4, 7]) ➞ [5, 4, 7] arrBetween(1, 10, [1, 10, 25, 8, 11, 6]) ➞ [8, 6] arrBetween(7, 32, [1, 2, 3, 78]) ➞ []

  6. e.g findIndex(["hi", "edabit", "fgh", "abc"], "fgh") ➞ 2 findIndex(["Red", "blue", "Blue", "Green"], "blue") ➞ 1 findIndex(["a", "g", "y", "d"], "d") ➞ 3 findIndex(["Pineapple", "Orange", "Grape", "Apple"], "Pineapple") ➞ 0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published