//1 variant
var
Obj1 = {};
Obj1.val = 5;
Obj1.str =
'Hello World!'
;
Obj1.fun =
function
() {
for
(
i=0; i<
this
.val; i++) {
document.write(
.str +
'<br />'
);
}
//2 variant
Obj2 = {
val: 5,
str:
,
fun:
};
//3 variant
Obj3 =
new
Object();
Obj3.val = 5;
Obj3.str =
Obj3.fun =
funMake() {
document.write(Obj1.str +
document.write(Obj1.val +
Obj1.fun();
'<br /><br />'
document.write(Obj2.str +
document.write(Obj2.val +
Obj2.fun();
document.write(Obj3.str +
document.write(Obj3.val +
Obj3.fun();
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
script
src
"js/script.js"
></
</
body
funMake();