Skip to content

Commit 2138599

Browse files
committed
Time: 0 ms (100%), Space: 49.1 MB (55.67%) - LeetHub
1 parent 92407af commit 2138599

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* @param {string} s
3+
* @return {boolean}
4+
*/
5+
var areNumbersAscending = function (s) {
6+
let numberList = s.split(' ').filter(e => !isNaN(e));
7+
for (let i = 1; i < numberList.length; i++) {
8+
if (Number(numberList[i]) <= Number(numberList[i - 1])) return false;
9+
}
10+
return true;
11+
};

0 commit comments

Comments
 (0)