More Related Content Similar to JavaScript Minification (20) JavaScript Minification87. 방법!
----
/**
* 구입할 수 있는 차종을 추천한다.
* @param {Number} money
* @return {String}
*/
function recommendCar(money) {
}
----
function recommendCar(money){}
295. 담아둔다.
----
var buyButton = document.getElementById('btn_buy_car');
----
var doc = document;
var buyButton = doc.getElementById('btn_buy_car');
345. 할당한다.
----
function Car(brand, money, color) {
this.brand = brand;
this.money = money;
this.color = color;
}
----
function Car(brand, money, color) {
var self = this;
self.brand = brand;
self.money = money;
self.color = color;
}
354. 번만.
----
function getCar(money) {
if (money 10000) {
return 'PORSCHE';
} else if (money 5000) {
return 'BMW';
} else {
return 'VW';
}
}
----
function getCar(money) {
var result = 'VW';
if (money 10000) {
result = 'PORSCHE';
} else if (money 5000) {
return = 'BMW';
}
return result;
}