How to Get only the number from string "Step-1" using javascript
I have "Step-1", "Step-2"... etc string. I want to get only the number. how can i get it ? My solution: var stepName = "Step-1"; var stepNumber = Integer.Parse(stepName[5]); console.log(stepNumber); but It is not good solution because stepName can be…