function snikers(){ this.t = function (){ alert("Привет Мир!"); } } var obj = new snikers(); obj.t();