function isJumping(number) {
const numbers = Array.from(String(number), Number);
if (numbers.length === 1) {
return "JUMPING";
}
for (let i = 0; i < numbers.length; i++) {
if (Math.abs(numbers[i] - numbers[i + 1]) !== 1) {
return "NOT JUMPING";
}
}
return "JUMPING";
}
console.log(isJumping(1));