Parse Flashcards

1
Q

How would you convert a string to a integer? If the value in the string is a number.

A

parseInt(num);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How would you convert a string to a decimal? If the value in the is a number.

A

parseFloat(num)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly