Check if a large number is divisible by 8

PHOTO EMBED

Wed Dec 02 2020 12:39:00 GMT+0000 (UTC)

Saved by @snigdhakhurana10

function divBy8(num){
  let number = num.toString();
  number = Number(number.substr(number.length - 3, number.length));
  if(number%8 === 0)
     return true;
  return false;
}

console.log(divBy8(363588395960667043875487));
content_copyCOPY