03/03/2010 Development / java script

Se servir pra vc, show de bola!!!

function getNumberExtension(n){
var arrNumber = new Array();
 arrNumber[0] = "Zero";
 arrNumber[1] = "Um";
 arrNumber[2] = "Dois";
 arrNumber[3] = "Três";
 arrNumber[4] = "Quatro";
 arrNumber[5] = "Cinco";
 arrNumber[6] = "Seis";
 arrNumber[7] = "Sete";
 arrNumber[8] = "Oito";
 arrNumber[9] = "Nove";

 for(var x = 0; x< n.length; x++){
 var _n = (arrNumber[n.charAt(x)] == undefined) ? n.charAt(x) : arrNumber[n.charAt(x)];
  document.write(_n + " ");
 }
}

getNumberExtension("9998-7732");