Weitere ähnliche Inhalte
Ähnlich wie [D2 오픈세미나]4.진보된개발환경 주우영 (20)
[D2 오픈세미나]4.진보된개발환경 주우영
- 348.
/**
* @param {Object} obj
* @param {string|number} key
*/
var findBy = function(obj, key){
// do something...
};
/**
* @type {string}
*/
var any = ‘name’;
- 392.
/**
* @param {Array} arr
* @param {string|number} key
*/
var findBy = function(arr, key){
// do something...
};
- 544. CODE/1
var Phone = function(){this.init.apply(this, arguments);};
Phone.prototype = {
id : 0,
type : '',
model : '',
name : '',
/**
* @constructs
*/
init : function(id, type, model, name){
this.id = id;
this.type = type;
this.model = model;
this.name = name;
}
};
- 545. CODE/2
var Phones = function(){this.init.apply(this, arguments);};
Phones.prototype = {
/**
* @type {Array.Phone}
*/
_phones : null,
/**
* @constructs
*/
init : function(){
this._phones = [];
},
/**
* @returns {Array.Phone}
*/
getPhones : function(){
return this._phones;
}
};