Skip welcome & menu and move to editor
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>
 
var add = (function () {
    var counter = 0;
    debugger; 
    return function () {
      counter = counter +1;
      debugger
       return counter += 1;
       ;
     }
})();
add();
debugger;
add();
debugger;
add();
Output

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

Dismiss x
public
Bin info
grimmer0125pro
0viewers