'use strict'
function myClass(first, second) {
// this.pehla = first;
var private_Var = 'i_am_private_variable';
this.doosra = second;
Object.defineProperty(this, 'pehla', { value: '_Haani_Constant', writable: false });
};
var instanceOfClass = new myClass('1', '2');
console.log(instanceOfClass.pehla);
console.log('Assigning value to pehla');
console.log("instanceOfClass.pehla = 'SomeOtherText' ");
try {
instanceOfClass.pehla = 'SomeOtherText';
} catch (e) {
console.log(e.message);
}
'pehla' property is dim highlighted as compared to 'doosra'
I have even asked on stackoverflow, however I am not fully satisfied with the answer.Please have a look in below link.
Thanks in Advance.
Syed Haani Hasan
--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/2d0187da-7034-4f42-a792-3fac3c3ce84b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.