Skip to content

Commit 0c193c3

Browse files
authored
Create 2119-a-number-after-a-double-reversal.js
1 parent 2869cbc commit 0c193c3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* @param {number} num
3+
* @return {boolean}
4+
*/
5+
var isSameAfterReversals = function(num) {
6+
if(('' +num).length === 1) return true
7+
const tmp = (''+num).endsWith('0')
8+
return !tmp
9+
};

0 commit comments

Comments
 (0)