JSFiddle - React, Tailwind, and code Playground

by João Vitor Scheuermann

TypeScript

function calc (fontSize: number, lineHeight: number, lineBreaks: number): number {		
    const em = 2288;
    const reduction = 662;    
    return (reduction * fontSize / em)/lineBreaks;    
}

console.log(calc(17, 24, 5))
console.log(calc(28, 36, 2))