This website works better with JavaScript
ホーム
エクスプローラ
ヘルプ
登録
サインイン
Ethosa
/
Learn
同期ミラー
https://github.com/Ethosa/Learn
ウォッチ
1
スター
0
フォーク
0
ファイル
課題
0
Wiki
ツリー:
5ca0001a70
ブランチ
タグ
main
Learn
/
Languages
/
js-rush
/
task6
Ethosa
5ca0001a70
add JS `is the number a repdigit` task
3 年 前
..
main.js
5ca0001a70
add JS `is the number a repdigit` task
3 年 前
readme.md
5ca0001a70
add JS `is the number a repdigit` task
3 年 前
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).