```javascript<!DOCTYPE html><html leng = \'en\'><head><meta charset = \'UTF-8\'/></head><body><script>var arr = []function test(num){num = parseInt(num);for(var i = 0; i < String(\'123\').length; i++){arr[i] = num % 10;console.log(arr[i]);num = (num - num % 10) / 10;}}test(123.456);for(var i = 0; i < arr.length; i++){document.write(arr[i]);}</script></body></html>
js将一个整数的各数字的反序打印
未经允许不得转载:爱站程序员基地 » js将一个整数的各数字的反序打印