Created
July 15, 2014 09:40
-
-
Save todiadiyatmo/ea7d0818e9ac3695e16b to your computer and use it in GitHub Desktop.
Basic Javascript Object
This file contains 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 Student = (function(){ | |
var _nim; | |
var _name; | |
function Student(nim, name){ | |
_nim = nim; | |
_name = name; | |
} | |
Student.prototype.getNim(){ | |
return _nim; | |
} | |
return Student; | |
})(); | |
var x = new Student("001","Jasoet"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment