Advertisement
Guest User

Untitled

a guest
May 21st, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Test() {
  2.   this.name = 'Test'
  3. }
  4.  
  5. Test.prototype = {
  6.   open: function(){
  7.     console.log(this.name);
  8.   }
  9. }
  10.  
  11. const testClass = new Test();
  12.  
  13. testClass.open();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement