JavaScript 2022 - New Features - Part 2
Class State Initialization
The class state can be initialized during declaration
class Emp {
eno=100;
ename="ram";
constructor() {
}
};
let obj = new Emp();
console.log(obj.eno,obj.ename); // 100 ram
In the above code the state of E...
mahavir.hashnode.dev3 min read