This article is wrong. You need to use prototype when defining your functions.
Here is how to do it:
<html>
<head>
<script>
function HotDog () {
this.name=arguments[0];
}
HotDog.prototype.name=null;
HotDog.prototype.getCondiments= function () {
document.getElementById('test').innerHTML='started...' +this.name;
};
var myHotDog = new HotDog('test 001');
window.onload= function() {
setTimeout(30, myHotDog.getCondiments());
};
</script>
</head>
<body>
<div id=test>loading...</div>
</body>
</html>