renovations
This commit is contained in:
parent
223dd884ae
commit
4b8b168fd2
42 changed files with 562 additions and 490 deletions
19
1-js/3-writing-js/1-debugging-chrome/debugging.view/index.html
Executable file
19
1-js/3-writing-js/1-debugging-chrome/debugging.view/index.html
Executable file
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script src="pow.js"></script>
|
||||
|
||||
Пример для отладчика.
|
||||
|
||||
<script>
|
||||
var fiveInCube = pow(5, 3);
|
||||
|
||||
alert( fiveInCube );
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
8
1-js/3-writing-js/1-debugging-chrome/debugging.view/pow.js
Executable file
8
1-js/3-writing-js/1-debugging-chrome/debugging.view/pow.js
Executable file
|
@ -0,0 +1,8 @@
|
|||
function pow(x, n) {
|
||||
if (n == 1) {
|
||||
return x;
|
||||
}
|
||||
|
||||
var result = x * pow(x, n-1);
|
||||
return result;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue