Question: use proper ES6 syntax including using let/const properly, code this in javascript ! Create a function named trackingStrings , it counts the number of times

use proper ES6 syntax including using let/const properly, code this in javascript !

Create a function named trackingStrings , it counts the number of times those words are present in the array

The trackingStrings function accepts an array argument. The solution will be an object with the key as the string and the count as the value.

const arr = ['happy', 'john', 'jones', 'john', 'jones', 'happy' , 'sad'] countingWords(arr); //output should be { jones: 2, john: 2, happy: 2, sad: 1 }

please write this in javascript es6 syntax using "let" and "const" , no html

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!