I need to get a number, knock the last number off and then return it as a number
i.e. given the number 12345, return 1234
is this the best way to do it:
let x = 12345
const y = x.toString().split('').slice(0, -1).join('')
const newNum = Number(y)
also is there a way to not do the const newNum and then just convert it back to a number in the string above?
Math.floor()