Skip to content

Commit 98b1446

Browse files
authored
Add Class_and_object.js with Employee class implementation and method examples
1 parent 870353e commit 98b1446

File tree

3 files changed

+21
-112
lines changed

3 files changed

+21
-112
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// create a Employee Class
2+
3+
class Employee{
4+
5+
info() {
6+
console.log("Employee Name : Rohan")
7+
}
8+
9+
10+
Salary(Emp_Salary){
11+
console.log("This is Salary : ",Emp_Salary)
12+
}
13+
14+
}
15+
16+
// function calling
17+
// create a object
18+
emp = new Employee();
19+
20+
emp.info();
21+
emp.Salary(4500);

Example/Objects/index.html

Lines changed: 0 additions & 12 deletions
This file was deleted.

Example/Objects/object.js

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)