.getProto()

Description

getProto returns the internal prototype object for the current string instance. This is mostly useful for reflection or when you need to inspect what methods / properties exist on the prototype at runtime.

Parameters

getProto takes no parameters.

Usage On Strings

proto @= "example".getProto()
log proto
// { "padStart": function, "padEnd": function, ... }

Last updated

Was this helpful?