j'ai une question lors de la création d'un objet javascript, quand une fonction invoquant une autre fonction au sein de l'objet, avons-nous besoin d'utiliser « cette »objet fonction javascript orienté appeler question débutant
MyObject = function() {
this.function_one = function(param) {
return param + param;
};
this.function_two = function(param) {
return this.function_one(param) * this.function_one(param);
// when invoking function_one, do i need to use 'this' ????
};
}
wow..thanks pour vous réponse rapide, je tente de faire la recherche google, mais je sais ce mot don 't clés dois-je rechercher ... Merci beaucoup. – jojo