JavaScript Concepts - The Type System: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
Line 9: Line 9:
console.log(b)
console.log(b)
2
2
<syntaxhighlight lang='javascript'>
</syntaxhighlight>

Latest revision as of 02:15, 10 December 2020

Internal

Conversion of a String to Int

var a = '1';
var b = parseInt(a) + 1;
console.log(b)
2