Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // entry.js
- function Entry (title) {
- this.title = title;
- }
- Entry.prototype = {
- title: null;
- }
- module.exports = Entry;
- // test.js
- var Entry = require('./entry')
- , entry = new Entry('first entry');
- console.log(entry.title);
- // shell
- node test.js
Add Comment
Please, Sign In to add comment