← Winnitude! Search  ·  Reader Mode (2543 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 89 LINKS

Methods of primitives by stevermeister · Pull Request #10 · javascript-tutorial/uk.javascript.info

Repository navigation

Methods of primitives - #10


Merged
tarasyyyk merged 7 commits into javascript-tutorial:master from stevermeister:translation May 9, 2019
Merged

Methods of primitives #10 tarasyyyk merged 7 commits into javascript-tutorial:master from stevermeister:translation

Conversation

stevermeister commented May 8, 2019



Copy link Copy Markdown
Contributor

No description provided.

stevermeister added 3 commits May 8, 2019 10:26 first try 2bf4a57 cleanup + task translation 0bf5087 grammar cleanup 471412a

CLAassistant commented May 8, 2019 · edited Loading



Copy link Copy Markdown


All committers have signed the CLA.

tarasyyyk reviewed May 8, 2019
View reviewed changes

tarasyyyk left a comment



Copy link Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more .

@stevermeister you did a great work. I found some small remarks which need to be resolved before merging.

Comment thread 1-js/05-data-types/01-primitives-methods/article.md
Outdated
@@ -1,22 +1,22 @@
# Methods of primitives
Comment thread 1-js/05-data-types/01-primitives-methods/article.md
Outdated

- Is a value of a primitive type.
- There are 6 primitive types : `string`, `number`, `boolean`, `symbol`, `null` and `undefined`.
- є Is a value of a primitive type.
Comment thread 1-js/05-data-types/01-primitives-methods/article.md
Outdated
З іншого боку, використання тих же самих функцій `String / Number / Boolean` без` new` є абсолютно розумною і корисною річчю. Вони перетворюють значення у відповідний тип: до рядка, числа або булевого (примітиву).

Наприклад, це цілком справедливо:
For example, this is entirely valid:
Comment thread 1-js/05-data-types/01-primitives-methods/article.md
Outdated
Наприклад, це цілком справедливо:
For example, this is entirely valid:
```js
let num = Number("123"); // convert a string to number
Comment thread 1-js/05-data-types/01-primitives-methods/article.md
Outdated
````

## Summary
## Виводи
iliakan mentioned this pull request May 8, 2019 Ukrainian Translation Progress #1 Open cleanup 127a02d tarasyyyk reviewed May 9, 2019
View reviewed changes
Comment thread 1-js/05-data-types/01-primitives-methods/article.md
Outdated
З іншого боку, використання тих же самих функцій `String / Number / Boolean` без` new` є абсолютно розумною і корисною річчю. Вони перетворюють значення у відповідний тип: до рядка, числа або булевого (примітиву).

Наприклад, це цілком справедливо:
For example, this is entirely valid:
Comment thread 1-js/05-data-types/01-primitives-methods/article.md
Outdated
@@ -126,7 +126,7 @@ let num = Number("123"); // convert a string to number
alert(null.test); // error
Comment thread 1-js/05-data-types/01-primitives-methods/1-string-new-property/solution.md
Outdated
Спробуйте запустити :

```js run
let str = "Hello";
Comment thread 1-js/05-data-types/01-primitives-methods/1-string-new-property/solution.md
Outdated
Ви можете отримати два результати :
1. `undefined`
2. An error .
2. помилка .
Comment thread 1-js/05-data-types/01-primitives-methods/1-string-new-property/task.md
Outdated
Розглянемо наступний код :

```js
let str = "Hello";
Comment thread 1-js/05-data-types/01-primitives-methods/article.md
Outdated
Але за все потрібно платити !

Objects are "heavier" than primitives. They require additional resources to support the internal machinery. But as properties and methods are very useful in programming, JavaScript engines try to optimize them to reduce the additional burden .
Об'єкти "важче", ніж примітиви. Вони вимагають додаткових ресурсів для підтримки внутрішньої обробки. Але, оскільки властивості і методи дуже корисні в програмуванні, двигун JavaScript намагається оптимізувати їх для зменшення додаткового навантаження .
Comment thread 1-js/05-data-types/01-primitives-methods/article.md
Outdated
Ось як він працює :

```js run
let str = "Hello";
Comment thread 1-js/05-data-types/01-primitives-methods/article.md
Outdated
1. The string `str` is a primitive. So in the moment of accessing its property, a special object is created that knows the value of the string, and has useful methods, like `toUpperCase()`.
2. That method runs and returns a new string (shown by `alert`).
3. The special object is destroyed, leaving the primitive `str` alone .
1. Рядок `str` є примітивом. Тому під час звернення до його властивості створюється спеціальний об'єкт, який знає значення рядка і має корисні методи, такі як `toUpperCase ()`.
Comment thread 1-js/05-data-types/01-primitives-methods/article.md
Outdated

if (zero) { // zero is true, because it's an object
if (zero) { // zero є true, тому що це об'єкт
alert( "zero is truthy?!?" );
Comment thread 1-js/05-data-types/01-primitives-methods/article.md
Outdated

On the other hand, using the same functions `String/Number/Boolean` without `new` is a totally sane and useful thing. They convert a value to the corresponding type: to a string, a number, or a boolean (primitive).

З іншого боку, використання тих же самих функцій `String / Number / Boolean` без` new` є абсолютно розумною і корисною річчю. Вони перетворюють значення у відповідний тип: до рядка, числа або булевого (примітиву).
cleanup after review 4bc3284

stevermeister commented May 9, 2019



Copy link Copy Markdown
Contributor

Author

@tarasyyyk thank you for detailed review! all places were updated accordingly to the comments

tarasyyyk added 2 commits May 9, 2019 14:51 small language correction 3d51eff small language corrections 3403c98 tarasyyyk merged commit 96163a4 into javascript-tutorial : master May 9, 2019

tarasyyyk commented May 9, 2019



Copy link Copy Markdown
Collaborator

@stevermeister found some fresh changes to English version:
javascript-tutorial/en.javascript.info@ 1ba420f
Would be good to translate them as well.

stevermeister commented May 9, 2019 · edited Loading



Copy link Copy Markdown
Contributor

Author

@tarasyyyk yes, sure
here you are
https://github.com/javascript-tutorial/uk.javascript.info/pull/11/files

and could you please update untranslated parts of this repo with actual en origin?

javascript-translate-bot pushed a commit that referenced this pull request Nov 11, 2019 Update article.md 580221f
Adding some mention of implicit `<tbody>` element. Comes up later in Modifying the Document task #10 solution.

tarasyyyk commented Mar 6, 2020



Copy link Copy Markdown
Collaborator

Thanks for your contribution!
@all-contributors add @stevermeister for translation.

allcontributors
Bot
mentioned this pull request Mar 6, 2020 docs: add stevermeister as a contributor #68 Merged

allcontributors
Bot
commented Mar 6, 2020



Copy link Copy Markdown
Contributor

@tarasyyyk

I've put up a pull request to add @stevermeister ! 🎉

tarasyyyk changed the title Data types > Methods of primitives Methods of primitives Aug 29, 2024 Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment

Labels

None yet

3 participants