javascriptConvert string to integer
var str = '123.50';
var num = Math.round(Number(str));ctrl + c| var strdeclares test string that contains number as text | var numwill contain resulting integer number | 
| Math.roundwill round converted number if it's not integer | Numberconverts string in argument to corresponding number (integer or float) | 
Related
More of Javascript
- Round to 1 decimal
- Toggle class of an element
- How to return to a previous page
- Get all children and grandchildren of an html element recursively
- Get selected option text of a dropdown (select) box
- Insert text into textarea at cursor position
- Access object key by variable
- Throw error
- Use variable as regex
- Get hostname by url
See more codes...