inspect

Object.inspect(obj) -> String

Returns the debug-oriented string representation of the object.

Prototype provides inspect methods for many types, both built-in and library-defined, such as in String, Array, Enumerable and Hash, which attempt to provide most-useful string representations (from a developer’s standpoint) for their respective types.

Examples


Object.inspect()
// -> 'undefined'

Object.inspect(null)
// -> 'null'

Object.inspect(false)
// -> 'false'

Object.inspect([1, 2, 3])
// -> '[1, 2, 3]'

Object.inspect('hello')
// -> "'hello'"