Skip to content

Instantly share code, notes, and snippets.

@polashrp
Created October 1, 2017 09:29
Show Gist options
  • Save polashrp/c487f1178ae48e907395713ab10b929f to your computer and use it in GitHub Desktop.
Save polashrp/c487f1178ae48e907395713ab10b929f to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/gatisat
<!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>
"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