var student = function () {
var db = {host:"localhost", name:"student", username:"me", password: "adda"};
var get = function (id) {
console.log(`Getting Student ${id} from db`);
if(id){
return {
name: 'Oliver Mensah',
school: 'Ashesi University',
country: 'Ghana'
}
}
}
var save = function (student) {
console.log(`Saving ${student.name} to the db`);
}
return{
get: get,
save: save
}
}
student().get(1)