| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Reflect/apply | [Back] [Original] |
Get to know MDN better
Reflect.apply()
console.log(Reflect.apply(Math.floor, undefined, [1.75]));
// : 1
console.log(
Reflect.apply(String.fromCharCode, undefined, [104, 101, 108, 108, 111]),
);
// : "hello"
console.log(
Reflect.apply(RegExp.prototype.exec, /ab/, ["confabulation"]).index,
);
// : 4
console.log(Reflect.apply("".charAt, "ponies", [3]));
// : "i"
Reflect.apply(target, thisArgument, argumentsList)
targetthisArgumenttarget this
argumentsList target
TypeErrortarget argumentsList
Reflect.apply() Reflect.apply(target, thisArgument, argumentsList)
Math.floor.apply(null, [1.75]);
Reflect.apply(Math.floor, null, [1.75]);
Reflect.apply() this target Reflect.apply() argumentsList Reflect.apply() target [[Call]]
Reflect.apply(Math.floor, undefined, [1.75]);
// 1;
Reflect.apply(String.fromCharCode, undefined, [104, 101, 108, 108, 111]);
// "hello"
Reflect.apply(RegExp.prototype.exec, /ab/, ["confabulation"]).index;
// 4
Reflect.apply("".charAt, "ponies", [3]);
// "i"
| ECMAScript 2027 LanguageSpecification # sec-reflect.apply |
| Web Proxy Viewer | New URL | Original Page |