OneCompiler

Question 1: Given an array of strings, write a function to count the total number of characters across all strings

139

const stringsArray = ["Hello", "World", "I", "Love", "JavaScript"];
const totalCharacters = stringsArray.reduce((acc, current) => acc + current.length, 0);
console.log(totalCharacters);