Home  • Programming • JavaScript

JavaScript variable and parsing data

To convert string to integer use funcition parseInt() Example:
<script>

var x;
y="6"
x=20;

document.writeln(x+y);
document.write(x+parseInt(y));
</script>
Output 206 26

Comments 0


Copyright © 2024. Powered by Intellect Software Ltd