Contact: aviboots(AT)netvision.net.il
43,874 questions
57,260 answers
573 users
function firstDecimalDigit(f) { return f.toString().split('.')[1][0] } const f = 891.79234; console.log(firstDecimalDigit(f)); /* run: 7 */
function firstDecimalDigit(f) { return Math.floor(Math.abs(f) * 10)) % 10; } const f = 891.79234; console.log(firstDecimalDigit(f)); /* run: 7 */