Prototype definition in object literal

but why does a frontend-programmer even need to inherit anything, when every piece of data he/she comes comes across is either a string or json-object that gets immediately serialized and sent-over-the-wire?

examples of poorly-designed, class-based api's for common frontend-tasks:

  1. forcing frontend-dev to create artificially-stateful/inheritable Temporal-objects, when the context is to statelessly message-pass isostrings between dom-elements <-> databases.

  2. forcing frontend-dev to create artificially-stateful/inheritable TextEncoder/TextDecoder objects when the context is to statelessly message-pass blob/utf8-string/arraybuffers across realms.

  3. forcing frontend-devs to create artificially-stateful/inheritable Intl-objects when the context is to statelessly message-pass javascript-number / human-readable-currency between database <-> presentation-layer.

  4. forcing nodejs-devs to create artificially-stateful/inheritable crypto-objects when the context is to statelessly message-pass plaintext / ciphertext / jwk-strings between external-endpoints.

the above ux examples and more would be better if tc39, whatwg, node-tsc provided static-functions instead (like fetch()) that directly transformed incoming local-isostring / blob / number / plaintext to output-ready utc-isostring / utf8-string / human-readable-currency / ciphertext that can be immediatedly sent-over-the-wire.

instead of wasting frontend-developer's time creating error-prone, intemediate, artificially-stateful class-objects, in the ultimately stateless message-passing context.