Created
October 8, 2020 07:35
-
-
Save kwarodom/1f4d2d11f1f0d4b37d496410433b91e2 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/pukiyukera
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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"> | |
"use strict"; | |
var numbers = [1, 2, 3]; | |
var doubleNumArray = numbers.map(function (num) { | |
return num * 2; | |
}); | |
console.log(numbers); | |
console.log(doubleNumArray); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">const numbers = [1,2,3]; | |
const doubleNumArray = numbers.map((num) => { | |
return num*2; | |
}); | |
console.log(numbers) | |
console.log(doubleNumArray)</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var numbers = [1, 2, 3]; | |
var doubleNumArray = numbers.map(function (num) { | |
return num * 2; | |
}); | |
console.log(numbers); | |
console.log(doubleNumArray); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment