Skip to main content

All Questions

1 vote
5 answers
138 views

JavaScript subarray Iteration

I want to capitalize the first letter of every word in a string. I want to know why this is not working: function titleCase(str) { str = str.toLowerCase().split(" "); for(let i = 0; i<...
Majd's user avatar
  • 348
2 votes
6 answers
102 views

Grouping Subarrays in Arrays

I'm wrapping my head around the following logic, but I'm still missing something. Given an Array like const testArr = ["F", "F", "C", "C", "F", "...
Jean-Marc Möckel's user avatar
0 votes
4 answers
151 views

How to add a new property to a subarrays?

I have an array with subarrays, I'm trying to add a new property title to each subarray. I have an implementation, but instead of adding the title to each subarray it puts it at the end of the array [...
Chris Michael's user avatar