Created
October 1, 2017 09:29
-
-
Save polashrp/c487f1178ae48e907395713ab10b929f to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/gatisat
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 muliplay = function muliplay(abc) { | |
for (var _len = arguments.length, values = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
values[_key - 1] = arguments[_key]; | |
} | |
//console.log(abc,values); | |
return values.map(function (n) { | |
return abc * n; | |
}); | |
}; | |
var result = muliplay(2, 3, 4); | |
console.log(result); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">let muliplay = (abc,...values)=>{ | |
//console.log(abc,values); | |
return values.map((n)=>{ | |
return abc * n; | |
}); | |
}; | |
let result = muliplay(2,3,4); | |
console.log(result);</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 muliplay = function muliplay(abc) { | |
for (var _len = arguments.length, values = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
values[_key - 1] = arguments[_key]; | |
} | |
//console.log(abc,values); | |
return values.map(function (n) { | |
return abc * n; | |
}); | |
}; | |
var result = muliplay(2, 3, 4); | |
console.log(result); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment