i am using javascript ES6
and babel
.
but i knew that apply doesn't work
finally, i found solution
var log = Function.prototype.bind.call(console.log, console);
log.apply(console, ["this", "is", "a", "test"]);
at this link console.log.apply not working in IE9
so i replace from
const params = [
level,
].concat(...args)
to
var params = [ level,]
var concat = Function.prototype.bind.call(params.concat, Array);
var paramsConcated =concat.apply(params, args)
but it printed out like this.
function Array() { ... }, [second arg...], [third arg..]
always print function Array() {...} for first argument.
do i have a misstake?
EDIT 1: i'm sorry that did not mention about output. i want to make paramsConcated to [level, args[0], args[1], ... , args[n]].
EDIT 2: after build, params.concat(...args) is replaced with concat.apply(params.args). so, i should not use 3 dots.