Testing jquery interactions with jasmine
There is a draw back though.
This is that the parseInt() function guesses the base of your number. Lets look at some examples to show how this could affect you.
parseInt( '06' ); //Returns 6
parseInt( '08' ); //Returns 0
parseInt( '08', 10 ); //Returns 8
There are other, shorter ways to convert a string into a integer. See the examples below.
~~'5'; //Returns 5 ~~'Foo Bar'; //A non integer returns 0 not NaN +'45'; //Returns 45 '1.58' * 1; //Returns 1.58
Hope this helps your integer parsing!