Update isArmstrongNumber.md

This commit is contained in:
Angelos Chalaris
2017-12-31 19:42:21 +02:00
committed by GitHub
parent 0970fcd136
commit 06cd4cbbc7

View File

@ -2,7 +2,7 @@
Checks if the given number is an Armstrong number or not. Checks if the given number is an Armstrong number or not.
Convert the given number into an array of digits. Use the exponent `**` operator to get the appropriate power for each digit and sum them up. If the sum is equal to the number itself, return `true` otherwise `false`. Convert the given number into an array of digits. Use the exponent operator (`**`) to get the appropriate power for each digit and sum them up. If the sum is equal to the number itself, return `true` otherwise `false`.
```js ```js
const isArmstrongNumber = digits => const isArmstrongNumber = digits =>