Created
April 19, 2015 17:17
-
-
Save pzaich/0c8b039df3514ba0d1e7 to your computer and use it in GitHub Desktop.
pojo_constructor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Library = function (books) { | |
var books = []; | |
this.searchBooks = function (query) { | |
// return books that match query | |
} | |
} | |
var books = []; | |
var library = new Library(books); | |
libary.books | |
=> 'undefined' | |
libary.searchBooks('some title') | |
=> [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment