Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions problems/for-loop/problem.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
For loops allow you to repeatedly run a block of code a certain number of times. This for loop logs to the console ten times:

```js
for (var i = 0; i < 10; i++) {
for (let i = 0; i < 10; i++) {
// log the numbers 0 through 9
console.log(i)
}
```

The first part, `var i = 0`, is run once at the beginning of the loop. The variable `i` is used to track how many times the loop has run.
The first part, `let i = 0`, is run once at the beginning of the loop. The variable `i` is used to track how many times the loop has run.

The second part, `i < 10`, is checked at the beginning of every loop iteration before running the code inside the loop. If the statement is true, the code inside the loop is executed. If it is false, then the loop is complete. The statement `i < 10;` indicates that the loop will continue as long as `i` is less than `10`.

Expand Down
4 changes: 2 additions & 2 deletions problems/for-loop/problem_es.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Un bucle for es como lo siguiente:

```js
for (var i = 0; i < 10; i++) {
for (let i = 0; i < 10; i++) {
// imprime los números del 0 al 9
console.log(i);
}
```
La variable `i` es utilizada como contador, en ella se almacenará la cantidad de veces que se ejecutó el bucle.

La expresión `i < 10;` indica el limite de veces que se ejecutara el código dentro del bucle.
La expresión `i < 10;` indica el limite de veces que se ejecutara el código dentro del bucle.
Este continuara iterando si `i` es menor que `10`.

La expresión `i++` incrementa la variable `i` en uno por cada iteración.
Expand Down
4 changes: 2 additions & 2 deletions problems/for-loop/problem_fr.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Les boucles `for` vous permettent de répéter l'exécution d'un bloc de code un certain nombre de fois. Cette boucle `for` affiche dans la console dix fois :

```js
for (var i = 0; i < 10; i++) {
for (let i = 0; i < 10; i++) {
// affiche les nombres de 0 a 9
console.log(i)
}
```

La première partie, `var i = 0`, n'est exécutée qu'une fois au début de la boucle. La variable `i` est utilisée pour compter le nombre d'exécutions de la boucle.
La première partie, `let i = 0`, n'est exécutée qu'une fois au début de la boucle. La variable `i` est utilisée pour compter le nombre d'exécutions de la boucle.

La seconde partie, `i < 10`, est vérifiée au début de chaque itération de la boucle avant que le code contenu ne s'exécute. Si la condition est valide, le code contenu dans la boucle est exécuté. Sinon, la boucle est terminée. La condition `i < 10;` indique que la boucle va continuer de s'exécuter tant que `i` est inférieur à `10`.

Expand Down
2 changes: 1 addition & 1 deletion problems/for-loop/problem_it.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
I cicli for si presentano come il seguente:

```js
for (var i = 0; i < 10; i++) {
for (let i = 0; i < 10; i++) {
// scrive i numeri da 0 a 9
console.log(i)
}
Expand Down
4 changes: 2 additions & 2 deletions problems/for-loop/problem_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ for ループを使うと、コードの塊を何回も繰り返し実行でき
次のfor ループはコンソールにログを10回書きます...

```js
for (var i = 0; i < 10; i++) {
for (let i = 0; i < 10; i++) {
// log the numbers 0 through 9
console.log(i)
}
```

for ループでは、最初の部分 `var i = 0` をループの最初に一回だけ実行します。
for ループでは、最初の部分 `let i = 0` をループの最初に一回だけ実行します。
ループを実行した回数を数えるために、変数 `i` を使います。

第二の部分 `i < 10;` は、ループの繰り返し毎にチェックする条件式です。
Expand Down
2 changes: 1 addition & 1 deletion problems/for-loop/problem_ko.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
for 반복문은 이렇게 생겼습니다.

```js
for (var i = 0; i < 10; i++) {
for (let i = 0; i < 10; i++) {
// log the numbers 0 through 9
console.log(i)
}
Expand Down
2 changes: 1 addition & 1 deletion problems/for-loop/problem_nb-no.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
For løkker ser slik ut:

```js
for (var i = 0; i < 10; i++) {
for (let i = 0; i < 10; i++) {
// skriv ut nummerne fra 0 til 9
console.log(i)
}
Expand Down
2 changes: 1 addition & 1 deletion problems/for-loop/problem_pt-br.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Loops com *for* são dessa forma:

```js
for (var i = 0; i < 10; i++) {
for (let i = 0; i < 10; i++) {
// log the numbers 0 through 9
console.log(i)
}
Expand Down
4 changes: 2 additions & 2 deletions problems/for-loop/problem_ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
Этот цикл for выводит значение переменной в консоль десять раз:

```js
for (var i = 0; i < 10; i++) {
for (let i = 0; i < 10; i++) {
// выводим в консоль числа от 0 до 9
console.log(i)
}
```

Первая часть конструкции цикла for, `var i = 0`, выполняется один раз в начале работы цикла. При этом переменная `i` в данном примере используется для хранения количества итераций цикла.
Первая часть конструкции цикла for, `let i = 0`, выполняется один раз в начале работы цикла. При этом переменная `i` в данном примере используется для хранения количества итераций цикла.

Условие `i < 10;` проверяется в начале каждой итерации перед выполнением блока кода, заданного внутри цикла. Если условие является верным, то блок кода внутри цикла будет выполнен. В противном случае выполнение цикла завершается. Выражение `i < 10;` задаёт предел выполнения цикла. Цикл будет выполняться до тех пор, пока `i` будет строго меньше `10`.

Expand Down
2 changes: 1 addition & 1 deletion problems/for-loop/problem_uk.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Цикл for виглядає ось так:

```js
for (var i = 0; i < 10; i++) {
for (let i = 0; i < 10; i++) {
// log the numbers 0 through 9
console.log(i)
}
Expand Down
2 changes: 1 addition & 1 deletion problems/for-loop/problem_zh-cn.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
For 循环看起来是这样的:

```js
for (var i = 0; i < 10; i++) {
for (let i = 0; i < 10; i++) {
// log the numbers 0 through 9
console.log(i)
}
Expand Down
2 changes: 1 addition & 1 deletion problems/for-loop/problem_zh-tw.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
For 迴圈看起來是這樣的:

```js
for (var i = 0; i < 10; i++) {
for (let i = 0; i < 10; i++) {
// log the numbers 0 through 9
console.log(i)
}
Expand Down
2 changes: 1 addition & 1 deletion problems/strings/problem.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ For this challenge, create a file named `strings.js`.
In that file create a variable named `someString` like this:

```js
var someString = 'this is a string';
const someString = 'this is a string';
```

Use `console.log` to print the variable **someString** to the terminal.
Expand Down
2 changes: 1 addition & 1 deletion problems/strings/problem_es.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Para este ejercicio, crea un archivo llamado `strings.js`.
En ese archivo define una variable llamada `someString` de la siguiente forma:

```js
var someString = 'this is a string';
const someString = 'this is a string';
```

Utiliza `console.log` para imprimir la variable `someString` a la terminal.
Expand Down
2 changes: 1 addition & 1 deletion problems/strings/problem_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Pour ce défi, créez un fichier nommé `chaines.js`.
Dans ce fichier, créez une variable nommée `someString` comme cela :

```js
var someString = 'this is a string';
const someString = 'this is a string';
```

Utilisez `console.log` pour afficher la variable **someString** dans le terminal.
Expand Down
2 changes: 1 addition & 1 deletion problems/strings/problem_it.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Per risolvere questa sfida, crea un file dal nome `strings.js`.
In questo file crea una variabile dal nome `someString` come segue:

```js
var someString = 'this is a string';
const someString = 'this is a string';
```

Usa `console.log` per stampare la variabile **someString** sul terminale.
Expand Down
2 changes: 1 addition & 1 deletion problems/strings/problem_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
ファイルの中で、次のように変数 `someString` を作りましょう。

```js
var someString = 'this is a string';
const someString = 'this is a string';
```

`console.log` を使い、変数 **someString** をターミナルに表示しましょう。
Expand Down
2 changes: 1 addition & 1 deletion problems/strings/problem_ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
그 파일 안에서 `someString`이라는 변수를 만드세요. 이렇게 하면 됩니다.

```js
var someString = 'this is a string';
const someString = 'this is a string';
```

`console.log`를 사용해 **someString** 변수를 터미널에 출력합니다.
Expand Down
2 changes: 1 addition & 1 deletion problems/strings/problem_nb-no.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ I denne oppgaven, lage en fil med navnet `strings.js`.
Lage en variabel `someString`, slik som dette:

```js
var someString = 'this is a string';
const someString = 'this is a string';
```

For å skrive variabelen **someString** til skjermen kan du bruke `console.log`.
Expand Down
2 changes: 1 addition & 1 deletion problems/strings/problem_pt-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Para este desafio, crie um arquivo chamado `strings.js`.
No arquivo que foi criado, crie uma variável chamada `someString` da seguinte forma:

```js
var someString = 'this is a string';
const someString = 'this is a string';
```

Use o `console.log` para imprimir a variável **someString** para o terminal.
Expand Down
2 changes: 1 addition & 1 deletion problems/strings/problem_ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
В этом файле объявите переменную `someString` таким образом:

```js
var someString = 'this is a string';
const someString = 'this is a string';
```

Воспользуйтесь командой `console.log()`, чтобы вывести значение переменной **someString** в консоль.
Expand Down
2 changes: 1 addition & 1 deletion problems/strings/problem_uk.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
У цьому файлі створіть змінну `someString` ось так:

```js
var someString = 'this is a string';
const someString = 'this is a string';
```

Використайте `console.log`, щоб вивести змінну **someString** до терміналу.
Expand Down
2 changes: 1 addition & 1 deletion problems/strings/problem_zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
在文件中像这样创建一个名为 `someString` 的变量:

```js
var someString = 'this is a string';
const someString = 'this is a string';
```

使用 `console.log` 打印变量 **someString** 到终端。
Expand Down
2 changes: 1 addition & 1 deletion problems/strings/problem_zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
在該檔案中像這樣建立一個名為 `someString` 的變數:

```js
var someString = 'this is a string';
const someString = 'this is a string';
```

使用 `console.log` 印出變數 **someString** 到終端機上。
Expand Down
6 changes: 3 additions & 3 deletions solutions/for-loop/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var total = 0;
var limit = 10;
const total = 0;
const limit = 10;

for (var i = 0; i < limit; i++) {
for (let i = 0; i < limit; i++) {
total += i;
}

Expand Down