Answers for "opposite to parseint"

0

use + to parseint in js

const ratingValue = userInput.value;
if(+ratingValue > 1) {}   // + works exactly like a parseInt()

if(parseInt(ratingValue > 1)) {}
Posted by: Guest on November-16-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language