This website works better with JavaScript
Etusivu
Tutki
Apua
Rekisteröidy
Kirjaudu sisään
Ethosa
/
Learn
peilaus alkaen
https://github.com/Ethosa/Learn
Tarkkaile
1
Äänestä
0
Fork
0
Tiedostot
Ongelmat
0
Wiki
Puu:
448470d721
Branchit
Tagit
main
Learn
/
Languages
/
js-rush
/
task6
Ethosa
5ca0001a70
add JS `is the number a repdigit` task
3 vuotta sitten
..
main.js
5ca0001a70
add JS `is the number a repdigit` task
3 vuotta sitten
readme.md
5ca0001a70
add JS `is the number a repdigit` task
3 vuotta sitten
readme.md
Is the Number a Repdigit
A repdigit is a positive number composed out of the same digit. Create a function that takes an integer and returns whether it's a repdigit or not.
Examples
isRepdigit(66) ➞ true isRepdigit(0) ➞ true isRepdigit(-11) ➞ false
Notes
The number
0
should return
true
(even though it's not a positive number).