Design pattern 1
/*
Metode 1: Lag et nytt objekt og funksjoner til dette objektet..
*/
if (typeof MyObject !== 'object') {
MyObject = {};
}
if (typeof MyObject.alertOK !== 'function') {
MyObject.alertOK = function () {
alert('OK');
};
}
MyObject.alertOK();