Hi DigiDev, Thank you for sharing your experience and knowledge. I have tried this with a recursive approach. Appreciate if you can review it. function stringLength(arr) { if (arr.length === 0) return arr; let output = []; let message = `${arr[0]}=${arr[0].length}`; output.push(message); return [...output, ...stringLength(arr.slice(1))]; }
Hi DigiDev, Thank you for sharing your experience and knowledge. I have tried this with a recursive approach. Appreciate if you can review it.
function stringLength(arr) {
if (arr.length === 0) return arr;
let output = [];
let message = `${arr[0]}=${arr[0].length}`;
output.push(message);
return [...output, ...stringLength(arr.slice(1))];
}
@@digidev7060 Thank you so much for review it