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 result = (function(a, b) {
   var foo, bar;
  
   // The comman operator evaulates each of it's operands and returns the last value of the last operand.
   foo = (bar = a, b);
  
   return foo;
})(1, 2);
console.log(result); // 2
Output

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

Dismiss x
public
Bin info
miguelmotapro
0viewers