I declare class user, and then added an object of the class
function user(uid, pwd){
this.uid = uid
this.pwd = pwd
function displayAll(){
document.write(uid)
document.write(pwd)
}
}
var Aaron = new user("Aaron", "123")
document.write(Aaron.uid)
I want to roll through the properties printing them out one by one, I tried this
Aaron.displayAll()
which evaluates to nothing, am I missing something? Any help would be amazing :)
userfunction, but never binded to it, hence it's not exposed and can't be accessed, resulting in a function available only inside theuserfunction.