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).