Dog.prototype.setName = function(name) { this.name = String(name).toLowerCase() } var q = new Dog() q.setName(q) // q.setName('q')
var id = W('#id').getValue() // W.one('#notexist').getValue() ... ... ... W('#container').html(...)
function getSignal(where) { if (where - lastTrain.where <= 2000) { return Signal.RED } else { return Signal.GREEN } } function getSignal(where) { if (where - lastTrain.where > 2000) { return Signal.GREEN } else { return Signal.RED } }