What is the difference between these two approaches? I am trying to understand Jquery and JavaScript better. Thanks in advance SO!

```
        /**
        * What is the difference between these two techniques?
        */

        /* Using JQuery Extend */

        var names = {name1 : 'Nicholas', name2: 'Bobby'}
        var ages = {age1 : '27', age2: '32'}
        var profile = $.extend(names, ages);
        console.log(profile.name1, profile.age1)

        /* By filling a blank object with the combined dataset */

        var names = { name1 : 'Nicholas', name2 : 'Bobby'}
        var ages = { age1 : '27', age2 : '32'}
        var profile = {};
        profile.names = names;
        profile.ages = ages;
        console.log(profile.names.name1, profile.ages.age1)

```