📘Reflect

JSobjectbuilt-in ⟩ Reflect

circle-check
circle-exclamation
circle-info

the first parameter to all the Reflect methods is called the target parameter.

Reflect.method()
Triggers when…
  • invokes f as a method of o , just like o.f(args).

  • same as f.apply(o, args).

constructarrow-up-right(C, args, newTarget)

  • invokes C as a constructor.

  • same as new C(...args).

  • newTarget is used as new.target (if specified).

  • delete a property.

  • similar to delete o[key].

  • returns boolean.

getarrow-up-right(o, key, receiver)

  • check if object o has property key.

  • similar to key in o.

  • returns true for any inherited properties.

setarrow-up-right(o, key, value, receiver)

  • set a property.

  • similar to o[key] = value.

  • returns boolean.

  • (not sure what the receiverarrow-up-right is for 😕)

Last updated