Add new attachment

Only authorized users are allowed to upload new attachments.

This page (revision-10) was last changed on 15-Apr-2016 14:22 by BlakeMcBride

This page was created on 25-Oct-2014 08:46 by BlakeMcBride

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 201 added one line
!! Classes
At line 203 added 5 lines
{{{
function MyClass(init) {
this.iv1 = init;
this.iv2 = 0;
}
At line 209 added 69 lines
MyClass.cv1 = 101;
MyClass.getCV1 = function() {
return MyClass.cv1;
}
MyClass.setCV1 = function(val) {
MyClass.cv1 = val;
}
MyClass.prototype.getIV1 = function() {
return this.iv1;
}
MyClass.prototype.setIV1 = function(val) {
this.iv1 = val;
}
var x = new MyClass(36);
var y = new MyClass(42);
print(x.getIV1());
print(y.getIV1());
print(MyClass.cv1);
x.setIV1(44);
y.setIV1(22);
MyClass.setCV1(202);
print(x.getIV1());
print(y.getIV1());
print(MyClass.getCV1());
}}}
! Inheritance
{{{
function Mammal(name) {
this.name = name;
}
Mammal.prototype.getName = function() {
return this.name;
}
function Cat(name, color) {
Mammal.call(this, name); // call the super constructor to inherit its instance vars
this.color = color;
}
Cat.prototype = Object.create(Mammal.prototype); // copy parent prototype to
// inherit its methods
// this must be done before
// assigning local methods
Cat.prototype.getColor = function() {
return this.color;
}
var a = new Cat("Woolfy", "Brown");
print(a.getName());
print(a.getColor());
}}}
Version Date Modified Size Author Changes ... Change note
10 15-Apr-2016 14:22 6.239 kB BlakeMcBride to previous
9 18-Dec-2015 08:39 6.226 kB BlakeMcBride to previous | to last
8 04-May-2015 09:37 6.208 kB BlakeMcBride to previous | to last
7 12-Jan-2015 18:30 6.04 kB BlakeMcBride to previous | to last
6 12-Jan-2015 18:28 6.039 kB BlakeMcBride to previous | to last
5 12-Jan-2015 12:33 4.779 kB BlakeMcBride to previous | to last
4 12-Jan-2015 12:27 4.667 kB BlakeMcBride to previous | to last
3 12-Jan-2015 09:41 4.542 kB BlakeMcBride to previous | to last
2 25-Oct-2014 09:02 4.442 kB BlakeMcBride to previous | to last
1 25-Oct-2014 08:46 0.012 kB BlakeMcBride to last
« This page (revision-10) was last changed on 15-Apr-2016 14:22 by BlakeMcBride