This commit is contained in:
Ilya Kantor 2017-02-23 19:03:14 +03:00
parent 20784e7f26
commit 7019d1470d
48 changed files with 1019 additions and 464 deletions

View file

@ -2,23 +2,22 @@ importance: 4
---
# Ошибки в стиле
# Bad style
Какие недостатки вы видите в стиле этого примера?
What's wrong with the code style below?
```js no-beautify
function pow(x,n)
{
var result=1;
for(var i=0;i<n;i++) {result*=x;}
let result=1;
for(let i=0;i<n;i++) {result*=x;}
return result;
}
x=prompt("x?",'')
n=prompt("n?",'')
let x=prompt("x?",''), n=prompt("n?",'')
if (n<=0)
{
alert('Степень '+n+'не поддерживается, введите целую степень, большую 0');
alert(`Power ${n} is not supported, please enter an integer number greater than zero`);
}
else
{
@ -26,3 +25,4 @@ else
}
```
Fix it.