Skip to content

Instantly share code, notes, and snippets.

View taulutwashi's full-sized avatar
🏠
Working from home

Taulut Hossain Washi taulutwashi

🏠
Working from home
  • Ami Probashi
  • Dhaka,Bangladesh
View GitHub Profile
@taulutwashi
taulutwashi / 1.js
Created February 28, 2021 12:31 — forked from getify/1.js
Converting English number sentences ("one hundred forty two point three") to numeric digits ("142.3")
convert("one hundred five"); // "105"
convert("six hundred and fifty three"); // "653"
convert("zero zero one two three"); // "123"
convert("twelve o three"); // "1203"
convert("thirteen zero nine"); // "1309"
convert("fifteen sixteen"); // "1516"
convert("fourteen ninety two"); // "1492"
convert("nineteen ten"); // "1910"
convert("twelve hundred"); // "1200"
convert("twenty three hundred"); // "2300"