1//The fancy word for the ability of multiple object types to
2//implement the same functionality is polymorphism -MDN
1<script>
2class A
3 {
4 display()
5 {
6 document.writeln("A is invoked");
7 }
8 }
9class B extends A
10 {
11 }
12var b=new B();
13b.display();
14</script>