• + 3 comments

    my take in JS

    function designerPdfViewer(h, word) {
        return Math.max(...word.split('').map((e) => h[e.charCodeAt(0) - 97] * word.length));
    }