var num=window.prompt(); var str = num.toString(); var result = [str[0]]; for(var x=1; x