Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
// note this is a string, (because of the quotes)
const stringNumber = "17"
// print out StringNumber to the console
console.log(stringNumber)
// call parseInt and store the result in a new variable called 
const realNumber = parseInt(stringNumber)
// value stored in realNumber is an integer 
// (because it is a number that is NOT surrounded by quotes)
console.log(realNumber)
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x