JS: The code copy is as follows: function truncateNumber(n){ return n|0; } test: The code copy is as follows: console.log(truncateNumber(12.345)); The browser prints out 12