본문 바로가기

# 02

[Android] Git 프로젝트 사용 보호되어 있는 글입니다.
[Android] 이미지 채우기 보호되어 있는 글입니다.
500 error 보호되어 있는 글입니다.
[JavaScript] super class Person {constructor(name, first, second) {this.name = name;this.first = first;this.second=second;}sum() {return this.first+this.second;}} class PersonPlus extends Person {constructor(name, first, second, third) {super(name, first, second);this.third=third;}sum() {return super.sum()+this.third;}avg() {return (this.first+this.second+this.third)/3;}} var kim = new PersonPlus('kim', 10, 20, 30..
[JavaScript] 상속 class Person {constructor(name, first, second) {this.name = name;this.first = first;this.second=second;}sum() {return this.first+this.second;}} class PersonPlus extends Person {avg() {return (this.first+this.second)/2;}} var kim = new PersonPlus('kim', 10, 20); console.log("kim.sum()", kim.sum());-> kim.sum() 30console.log("kim.avg()", kim.avg());-> kim.avg() 15
[JavaScript] class class Person {constructor(name, first, second) {this.name = name;this.first = first;this.second=second;}sum() {return this.first+this.second;}} var kim = new Person('kim', 10, 20); kim.sum = function(){return 'this : '+(this.first+this.second);} var lee = new Person('lee', 10, 10);console.log("kim.sum()", kim.sum());-> kim.sum() this : 30console.log("lee.sum()", lee.sum());-> lee.sum() 20
[JavaScript] prototype function Person(name, first, second, third) {this.name=name;this.first=first;this.second=second;this.third=third;} Person.prototype.sum = function( ) {return this.first+this.second+this.third;} var kim = new Person('kim', 10, 20, 30); kim.sum = function(){return 'this : '+(this.first+this.second+this.third);} var lee = new Person('lee', 10, 10, 10);console.log("kim.sum()", kim.sum());-> kim.sum(..
[JavaScript] this var kim = {name : 'kim',first:10,second:20,sum:function() {return this.first+this.second;}} constructor 생성자 var d1=new Date('2019-4-10');console.log('d1.getFullyear( )', d1.getFullYear( ));->d1.getFullyear( ) 2019console.log('d1.getMonth( )', d1.getMonth( ));->d1.getMonth( ) 3 function Person(name, first, second, third) { this.name=name;this.first=first;this.second=second;this.third=third;this.s..