Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: dd52d2b534
Fetching contributors…

Cannot retrieve contributors at this time

file 31 lines (23 sloc) 0.355 kb

append one object to another.

append(obj1, obj2)


var a = {
    name: "a",
    width: 90,
    height: 70

var b = {
    name: "b",
    length: 6

console.log(append(a, b));

This will print

{ name: 'b', width: 90, height: 70, length: 6 }

As you can see, existing properties are getting replaced.

Something went wrong with that request. Please try again.