Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
var n = 35.85001;
console.log(Math.ceil(n * 100) / 100);  // 35.86
var n = 35.800001;
console.log(Math.ceil(n * 10) / 10);    // 35.9
var n = 35.00001;
console.log(Math.ceil(n));              // 36
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers