Errori scope #1

by sandro_paganotti

JavaScript

function hello(name){
    console.log(this);
}

var say = {
    hello: function(name){
        console.log(this);
    }
}

hello('world');
say.hello('world');


/* --- --- */
var Utente = function(nome){
    this.nome = nome;
    return this;
};

var utente1 = Utente('sandro');
var utente2 = Utente('francesca');

/* --- cosa stampa utente2.nome --- */