Skip to content

Instantly share code, notes, and snippets.

@todiadiyatmo
Created July 15, 2014 09:40
Show Gist options
  • Save todiadiyatmo/ea7d0818e9ac3695e16b to your computer and use it in GitHub Desktop.
Save todiadiyatmo/ea7d0818e9ac3695e16b to your computer and use it in GitHub Desktop.
Basic Javascript Object
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