August 2017
Intermediate to advanced
1330 pages
56h 17m
English
var SimpleMath = Class.create();
SimpleMath.square = function(x) {
return x * x;
};
Notice how the square function has been attached directly to SimpleMath, without altering the prototype. This means that you don't use the new operator.
gs.info(x_hotel.SimpleMath.square(10));
Read now
Unlock full access