Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * API client.
- */
- function Api() {
- this.my_var = 'my variable';
- }
- /**
- * My Function
- */
- Api.prototype.myFunction = function() {
- // have tried this
- this.hello();
- // and this
- Api.hello();
- }
- /**
- * Hello
- */
- Api.prototype.hello = function() {
- console.log('Hello!');
- }
- // expose the Api class
- module.exports = Api;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement