You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//A Narcissistic Number is a positive number which is the sum of its own digits, each raised to the power of the number of digits in a given base. In this Kata, we will restrict ourselves to decimal (base 10)
function narcissistic(value) {
let dur = (value+ '').length
let arr = (value + '').split('')
let newArr = arr.map(x => Math.pow(Number(x),dur))