LeetCodePercentage of Letter in StringPercentage of Letter in StringEasyStringSolution export function percentageLetter(s: string, letter: string): number { let letterCount = 0; for (const char of s) { if (char === letter) { letterCount += 1; } } return Math.floor((letterCount / s.length) * 100); }LeetCodePercentage of Letter in Stringhttps://leetcode.com/problems/percentage-of-letter-in-string