Mini Linter question

on mini linter and at the end it say to try making a function for the counts and i wanna know how one who go about it so i can see for future reference.

const logInfo = (param1, param2, param3) => {    
console.log('Word count: ' + param1);  
//The rest of your code goes here};

this is the hint it gave and i kinda tired a go at it but i can’t get nothing to work. also can be use to simplify the overusedWords count into a function so i only had to write it onces and called it later so i can console.log it into the logInfo

hello Shyark,

What I did was to allocate 5 parameters to the function and passing in word count as storyWords.length, sentence count, really, very and basically counts as the arguments.

here is my code:
// function to log the items

const logInfo = (param1, param2, param3, param4, param5) => {
// param1 = storyWords.length;, param2 = sentencesCounter; etc

//word count

console.log(“word Count is :” + param1);

//sentence count
console.log(`There are ${param2} sentences count`)

//each overused words count    
console.log("really appears :" + param3);
console.log("very appears :" + param4);
console.log("basically appears :" + param5);


//passing in arguments
logInfo( storyWords.length, sentencesCounter, reallyCounter, veryCounter, basicallyCounter)

here is a link to my finished project:

Hope this helps.

thank you so much, this helped a lot.

You are welcome.

Lets keep coding.