Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Does my number look big in this? js

function narcissistic(value) {
   const _value = String(value).split('');

  let _result = 0;

  for (ch of _value) {
    const num = parseInt(ch, 0)

    _result += Math.pow(num, _value.length);
  }

  return _result === value;
  // Code me to return true or false
}
 
PREVIOUS NEXT
Tagged: #Does #number #big #js
ADD COMMENT
Topic
Name
9+4 =