I have a class / function called MyApp and have some special attributes init for example this.memory and this.userMedia to access these functions within my own app
I don't know if this copies the function or just uses the reference for the function? is this allowed or does it have some kind memory issue?
function MyApp(name) {
this.name = name;
// special attributes
this.memory = window.localStorage;
this.userMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
}