convert string to int react native code example
Example 1: string to int javascript
var text = '42px';
var integer = parseInt(text, 10);
// returns 42
Example 2: convert a string to number in javascript
var x = Number("1000")
var text = '42px';
var integer = parseInt(text, 10);
// returns 42
var x = Number("1000")