Skip to content

Instantly share code, notes, and snippets.

@eboominathan
Created January 6, 2018 06:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eboominathan/7fae76af632c78ab678cceb9fa3cedc5 to your computer and use it in GitHub Desktop.
Save eboominathan/7fae76af632c78ab678cceb9fa3cedc5 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/jejizer
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
class Person{
constructor(){
this.name = 'Boomi';
}
printMyname(){
console.log(this.name);
}
}
class Human extends Person{
constructor(){
super();
this.name = 'Test';
}
printMyname(){
console.log(this.name);
}
}
const person = new Person();
const human = new Human();
person.printMyname();
human.printMyname();
</script>
<script id="jsbin-source-javascript" type="text/javascript">class Person{
constructor(){
this.name = 'Boomi';
}
printMyname(){
console.log(this.name);
}
}
class Human extends Person{
constructor(){
super();
this.name = 'Test';
}
printMyname(){
console.log(this.name);
}
}
const person = new Person();
const human = new Human();
person.printMyname();
human.printMyname();
</script></body>
</html>
class Person{
constructor(){
this.name = 'Boomi';
}
printMyname(){
console.log(this.name);
}
}
class Human extends Person{
constructor(){
super();
this.name = 'Test';
}
printMyname(){
console.log(this.name);
}
}
const person = new Person();
const human = new Human();
person.printMyname();
human.printMyname();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment