convertir une chaîne en entier

var text = '42px';
var integer = parseInt(text, 10);
// returns 42
Grieving Gemsbok