clone

external fun clone(obj: Any, deep: Boolean? = definedExternally): Any(source)

Clones an object, returning a new object containing the same properties.

Return

The cloned object.

Parameters

object

The object to clone.

deep

If true, all properties will be deep cloned recursively. Default value - false

See also