daily pastebin goal
49%
SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Person(name){
  2.     this.name = name
  3. }
  4.  
  5. Person.prototype = {
  6.     //先將 constructor 設置好
  7.     constructor: Person,
  8.     sayHello: function(){
  9.         console.log(`Hello ${this.name}`)
  10.     }
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top