Skip to content

Instantly share code, notes, and snippets.

@zachowdhury
Created April 28, 2018 09:01
Show Gist options
  • Save zachowdhury/cc672c6c9e968d49ba3ad3adb55296ed to your computer and use it in GitHub Desktop.
Save zachowdhury/cc672c6c9e968d49ba3ad3adb55296ed to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/boxuyey
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
const sandwiches = [
{ name: 'Ham', toppings: ['mustard'] },
{ name: 'Grilled cheese', toppings: ['cheese', 'cheese', 'cheeeeese'] }
];
var numbers = [1, 4, 9];
const out = sandwiches.map (
( a)=>{
return a.name ;
});
console.log ( out );
var out2= (x)=> 3*x
console.log ( out2(2));
</script>
<script id="jsbin-source-javascript" type="text/javascript">const sandwiches = [
{ name: 'Ham', toppings: ['mustard'] },
{ name: 'Grilled cheese', toppings: ['cheese', 'cheese', 'cheeeeese'] }
];
var numbers = [1, 4, 9];
const out = sandwiches.map (
( a)=>{
return a.name ;
});
console.log ( out );
var out2= (x)=> 3*x
console.log ( out2(2));
</script></body>
</html>
const sandwiches = [
{ name: 'Ham', toppings: ['mustard'] },
{ name: 'Grilled cheese', toppings: ['cheese', 'cheese', 'cheeeeese'] }
];
var numbers = [1, 4, 9];
const out = sandwiches.map (
( a)=>{
return a.name ;
});
console.log ( out );
var out2= (x)=> 3*x
console.log ( out2(2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment