Unterschied zwischen parseInt () und parseFloat () [duplizieren]

Mögliche Duplikate:
Verhaltensunterschied zwischen parseInt () und parseFloat ()

var box  = $('.box'),
fontSize = parseInt(box.css('font-size'), 10) + 5;

 $('button').on('click', function() {
  box.animate({fontSize: fontSize});
});

// ..

 var box  = $('.box'),
 fontSize = parseFloat(box.css('font-size'), 10) + 5;

  $('button').on('click', function() {
    box.animate({fontSize: fontSize})
});

Was ist der Unterschied zwischen ..

**fontSize = parseInt(box.css('font-size'), 10);**

**fontSize = parseFloat(box.css('font-size'), 10);**

und und warum sollte 10 als Kontext gesetzt werden. Bitte helfen Sie?

Antworten auf die Frage(2)

Ihre Antwort auf die Frage