Created
August 18, 2015 14:26
-
-
Save AFelipeTrujillo/4f81bb94f1c915c0be81 to your computer and use it in GitHub Desktop.
To parse an integer in javascript with jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sNum = "12314"; | |
var num = parseInt(sNum.match(/\d+/)[0]); | |
console.log(num); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment