Skip to content

Instantly share code, notes, and snippets.

@douglaspetrin
Created November 2, 2018 14:02
Show Gist options
  • Save douglaspetrin/dfafaa4b8215ba554d13afc313cdcbb8 to your computer and use it in GitHub Desktop.
Save douglaspetrin/dfafaa4b8215ba554d13afc313cdcbb8 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/karemoh
<!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">
// Refreshing Array Functions
const numbers = [1,2,3];
const doubleNumArray = numbers.map((num) => {
return num * 2;
});
console.log(numbers);
console.log(doubleNumArray);
// map() is built in function
/* map is calling each element and executing the num() kind of iteration */
</script>
<script id="jsbin-source-javascript" type="text/javascript">// Refreshing Array Functions
const numbers = [1,2,3];
const doubleNumArray = numbers.map((num) => {
return num * 2;
});
console.log(numbers);
console.log(doubleNumArray);
// map() is built in function
/* map is calling each element and executing the num() kind of iteration */</script></body>
</html>
// Refreshing Array Functions
const numbers = [1,2,3];
const doubleNumArray = numbers.map((num) => {
return num * 2;
});
console.log(numbers);
console.log(doubleNumArray);
// map() is built in function
/* map is calling each element and executing the num() kind of iteration */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment