insert adds a new property to the object or overwrites an existing one.
insert
key — property name to insert.
val — value to assign.
obj = {a:1} obj.insert("b",2) log obj // {a:1,b:2}
Last updated 3 months ago