I am new to javascript app development.When i came with functions and all i have found a code like
function Parenizor(value) {
console.log(this.setValue());
}
Parenizor.method('setValue', function () {
console.log('am called');
});
Parenizor.method('getValue', function () {
return 1;
});
Parenizor.method('toString', function () {
return 2;
});
And when i called the function like
var a = new Parenizor(1)
a.setValue()
It throws me error like Undefined not a function
..Why is it like this ??..Hope anyone here can find my mistake ..Thanz ..:)