62 lines
766 B
HTML
62 lines
766 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head lang="en">
|
|
<meta charset="UTF-8">
|
|
<title></title>
|
|
</head>
|
|
<body>
|
|
|
|
<script>
|
|
var a = 5;
|
|
|
|
function f(){return a;}
|
|
|
|
document.writeln(f());
|
|
|
|
var a = 10;
|
|
|
|
document.writeln(f());
|
|
|
|
|
|
|
|
|
|
oggetto = {
|
|
nome:"n",
|
|
cognome:"c"
|
|
}
|
|
|
|
if ("nome" in oggetto)
|
|
document.writeln(oggetto.nome);
|
|
|
|
|
|
f2.counter=0;
|
|
function f2(){
|
|
document.writeln(arguments.length);
|
|
document.writeln(arguments.callee.length);
|
|
document.writeln(arguments.callee.counter);
|
|
document.writeln(f2.counter);
|
|
|
|
if (f2.counter < 100){
|
|
f2.counter++;
|
|
document.writeln("recursive " + f2.counter);
|
|
f2();
|
|
}
|
|
|
|
|
|
}
|
|
|
|
f2("a","b","c","d");
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
</html> |