-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this 바인딩 #7
Comments
JavaScript의 this자바스크립트에서
객체의 메서드 호출var obj = {
organization : 'Im-D',
sayHello : function() {
return 'Welcome to ' + this.organization;
}
}
console.log(obj.sayHello()); 객체의 메서드를 호출할 때 일반 함수 호출var organization = 'Im-D';
function sayHello() {
var organization = 'Kyonggi';
return 'Welcome to ' + this.organization
}
console.log(sayHello()); 일반 함수를 호출할 때, 자바스크립트의 생성자 함수의 호출function Organization(name, country) {
this.name = name;
this.country = country;
}
var imD = new Organization('Im-D', 'South Korea');
var kyonggi = Organization('Kyonggi', 'South Korea');
console.log(imD);
console.log(kyonggi); 생성자 함수를
|
🙏 Reference
The text was updated successfully, but these errors were encountered: