extend() 合并对象

// 合并对象
    // 深度合并
    var result_1 = $.extend( true,  {},  
                    { name: "John", location: {city: "Boston",county:"USA"} },  
                    { last: "Resig", location: {state: "MA",county:"China"} } 
                ); 

    // 一般合并
    var result_2 = $.extend( {},  
                    { name: "John", location: {city: "Boston",county:"USA"} },  
                    { last: "Resig", location: {state: "MA",county:"China"} } 
                ); 

    //    添加hello函数
    var fnHello = $.extend({
        hello: function(){
            console.log("132");
        }
    })

    // 调用方法
    fnHello.hello()
    console.log(result_1, result_2)