Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started