Skip to content

Commit e22b914

Browse files
committed
Use const instead of let in exercises
1 parent b7da9d1 commit e22b914

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Exercises.en.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
Prepare two implementations of `inc` function:
1313
1. First with signature `inc(n: number): number`,
14-
call example: `let a = 5; const b = inc(a); console.dir({ a, b });`
14+
call example: `const a = 5; const b = inc(a); console.dir({ a, b });`
1515
2. Second with signature `inc(num: Num)` where `Num` is object with field `n`,
1616
so function will change field of the object passed by reference,
17-
call example: `let obj = { n: 5 }; inc(obj); console.dir(obj);`
17+
call example: `const obj = { n: 5 }; inc(obj); console.dir(obj);`
1818

1919
## Types
2020

Exercises.ru.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
Подготовьте две реализации функции `inc`:
1313
1. C сигнатурой `inc(n: number): number`,
14-
пример вызова: `let a = 5; const b = inc(a); console.dir({ a, b });`
14+
пример вызова: `const a = 5; const b = inc(a); console.dir({ a, b });`
1515
2. C сигнатурой `inc(num: Num)`, где `Num` является объектом с полем `n`,
1616
чтобы функция изменила поле исходного объекта переданного по ссылке,
17-
пример вызова `let obj = { n: 5 }; inc(obj); console.dir(obj);`
17+
пример вызова `const obj = { n: 5 }; inc(obj); console.dir(obj);`
1818

1919
## Типы объектов
2020

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy