https://leetcode.com/problems/check-if-numbers-are-ascending-in-a-sentence/


Runtime: 86 ms, faster than 70.59% of TypeScript online submissions for Check if Numbers Are Ascending in a Sentence.

Memory Usage: 43.1 MB, less than 64.71% of TypeScript online submissions for Check if Numbers Are Ascending in a Sentence.


```typescript
function isNumeric(str: string): boolean {
  if (typeof str != "string") return false // we only process strings!  
  return !isNaN(Number(str)) && !isNaN(parseFloat(str)) 
}

function areNumbersAscending(s: string): boolean {
    //7:04
    let i = 0;
    let previous = null;
    for (const value of s.split(" ")) {
        if (isNumeric(value)) {
            //console.log(value)
            if (previous == null) {
                previous = Number(value)
            } else {
                if (Number(value) <= previous) {
                    return false
                }
                previous = Number(value)
            }
        }
    }
    return true
    //7:08
};
```
