Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. /**
  2. * API client.
  3. */
  4. function Api() {
  5. this.my_var = 'my variable';
  6. }
  7.  
  8. /**
  9. * My Function
  10. */
  11. Api.prototype.myFunction = function() {
  12. // have tried this
  13. this.hello();
  14.  
  15. // and this
  16. Api.hello();
  17. }
  18.  
  19. /**
  20. * Hello
  21. */
  22. Api.prototype.hello = function() {
  23. console.log('Hello!');
  24. }
  25.  
  26. // expose the Api class
  27. module.exports = Api;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement