JSFiddle - React, Tailwind, and code Playground

by Leo Cavalcante

JavaScript

var toWord = toWord || (function(){
    var _words = {
        '/1/' : 'um',
        '/2/' : 'dois',
        '/3/' : 'três',
        '/4/' : 'quatro',
        '/5/' : 'cinco',
        '/6/' : 'seis',
        '/7/' : 'sete',
        '/8/' : 'oito',
        '/9/' : 'nove'
    };
    
    return function(number){
        var number = number.toString().split('').reverse().join('');
        
        
    };
}());

console.log(toWord(5));