Skip to content

doc: some fixes in console.md

Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc, console

Description of change
  1. var -> const / let

  2. Object.setPrototypeOf() -> Object.create(). The new variant is slightly more verbose, but the former one is warned against as less efficient: see the performance warnings here or here. The changed example was advised as a way to extend a core lib class in a userland lib, so maybe the doc could use a more careful code here. The verbosity is induced by a wish to get the same property descriptors as the others of the console methods.

Merge request reports

Loading