- Notifications
You must be signed in to change notification settings - Fork179
Object to primitive conversion#154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Object to primitive conversion#154
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Дякую за переклад!
Додав пару нових рядків, щоб номери рядків збігалися з оригінальним текстом.
Thank you 💖 I updated the Progress Issue#1 🎉 🎉 🎉 |
UkrainianCitizen commentedJul 30, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Еммммммм................. я почав робити рев'ю, а ти замерджив |
UkrainianCitizen commentedJul 30, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Там були граматичні, семантичні та помилки перекладу |
JavaScriptdoesn't exactly allow to customize how operators work on objects. Unlike some other programming languages, such as Rubyor C++,we can't implement a special object method to handle an addition (or other operators). | ||
JavaScriptне дозволяє налаштувати, як працюють оператори з об’єктами. На відміну від деяких інших мов програмування, таких як Rubyабо C++,ми не можемо реалізувати спеціальний об’єктний метод для обробки додавання (або інших операторів). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Кома передяк не потрібна.Деяких можна забрати. Кращеметод об'єкта.
In case of such operations, objects are auto-converted to primitives, and then the operation is carried out over these primitives and results in a primitive value. | ||
У разі таких операцій об’єкти автоматично перетворюються на примітиви, а потім операція здійснюється над цими примітивами та повертає результат у вигляді примітивного значення. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
У разі таких операцій об’єкти автоматично перетворюються на примітиви,а потімопераціяздійснюється над цими примітивами та повертає результат у вигляді примітивного значення. | |
У разі таких операцій, об’єкти автоматично перетворюються на примітиви,даліопераціявиконується над цими примітивами, що закінчується поверненням результату як примітивного значення. |
E.g. we can't make objects representing vectors or matrices (or archievements or whatever), add them and expect a "summed" object as the result. Such architectural feats are automatically "off the board". | ||
Наприклад, ми не можемо зробити об’єкти, що представляють вектори або матриці (або досягнення або що завгодно) та додати їх і очікувати, що "підсумковий" результат буде об’єктом. Автоматично такі архітектурні особливості недоступні. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
В реченнні немає сенсу, дослівний необдуманий переклад.
Старайтеся перекладати правильно, а не дослівно, будь ласка
Наприклад, ми не можемозробити об’єкти, щопредставляютьвектори або матриці (або досягнення абощо завгодно) тадодати їхі очікувати, що"підсумковий"результат буде об’єктом. Автоматично такі архітектурніособливості недоступні. | |
Наприклад, ми не можемостворити об’єкти, щоявляють собоювектори або матриці (або досягнення абощось інше),додати їхта очікувати, що результат буде об’єктом. Автоматично такі архітектурні"трюки" недоступні. |
Пудсумковий результат - тавтологія
https://onlinecorrector.com.ua/uk/%D0%B1%D1%83%D1%82%D0%B8-%D1%8F%D0%B2%D0%BB%D1%8F%D1%82%D0%B8-%D1%81%D0%BE%D0%B1%D0%BE%D1%8E/
We have two purposes: | ||
У нас є два цілі: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
У нас єдва цілі: | |
У нас єдві цілі: |
1. It will allow us to understand what's going on in case of coding mistakes, when such an operation happened accidentally. | ||
2. There are exceptions, where such operations are possible and look good. E.g. subtracting or comparing dates (`Date` objects). We'll come across them later. | ||
1. Це дозволить нам зрозуміти, що відбувається у випадку помилок коду, коли така операція відбулася випадково. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
1. Це дозволить нам зрозуміти, що відбувається у випадкупомилок коду, коли така операція відбулася випадково. | |
1. Це дозволить нам зрозуміти, що відбувається у випадкунеправильно написаного коду, коли така операція відбулася випадково. |
So, because we can't do much here, there's no maths with objects in real projects. When it happens, it's usually because of a coding mistake. | ||
Отже, оскільки ми не можемо автоматично за допомогою мови програмування виконувати подібні операції над об’єктами, то в реальних проєктах немає "математики з об’єктами". Коли стаються подібні операції (наприклад, `obj1 + obj2`), причиною цьому зазвичай є помилка програмування. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Отже, оскільки мине можемо автоматично за допомогою мови програмування виконувати подібні операції над об’єктами, то в реальних проєктах немає "математики з об’єктами". Колистаються подібні операції (наприклад,`obj1 + obj2`), причиною цьомузазвичай є помилка програмування. | |
Отже, оскільки митут вже нічого не можемо зробити, то в реальних проєктах немає "математики з об’єктами". Колиподібне відбувається, то причиною,зазвичай, є помилка програмування. |
In the chapter<info:type-conversions>we've seen the rules for numeric, string and boolean conversions of primitives. But we left a gap for objects. Now, as we know about methods and symbols it becomes possible to fill it. | ||
У розділі<info:type-conversions>ми бачили правила для перетворення чисел, рядків та булевих примітивів. Але ми залишили пробіл для об’єктів. Тепер, оскільки ми знаємо про методи та символи, можемо заповнити його. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
У розділі<info:type-conversions> ми бачили правиладляперетворення чисел, рядків та булевих примітивів. Але ми залишилипробіл для об’єктів. Тепер, оскільки ми знаємо про методи та символи, можемо заповнитийого. | |
У розділі<info:type-conversions>, ми бачили правила перетворення чисел, рядків та булевих примітивів. Але ми залишилипрогалину щодо об’єктів. Тепер, оскільки ми знаємо про методи та символи,миможемо заповнитиїї. |
1. All objects are `true` in a boolean context. There are only numeric and string conversions. | ||
2. The numeric conversion happens when we subtract objects or apply mathematical functions. For instance, `Date` objects (to be covered in the chapter <info:date>) can be subtracted, and the result of `date1 - date2` is the time difference between two dates. | ||
3. As for the string conversion -- it usually happens when we output an object like `alert(obj)` and in similar contexts. | ||
1. Всі об’єкти -- це `true` в булевому контексті. Є лише числові та рядкові конверсії. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Або коротке тире– або тире—. Ніяких--
1. All objects are `true` in a boolean context. There are only numeric and string conversions. | ||
2. The numeric conversion happens when we subtract objects or apply mathematical functions. For instance, `Date` objects (to be covered in the chapter <info:date>) can be subtracted, and the result of `date1 - date2` is the time difference between two dates. | ||
3. As for the string conversion -- it usually happens when we output an object like `alert(obj)` and in similar contexts. | ||
1. Всі об’єкти -- це `true` в булевому контексті. Є лише числові та рядкові конверсії. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Краще конверсії чисел та рядків
What happens when objects are added`obj1 + obj2`,subtracted `obj1 - obj2`or printed using `alert(obj)`? | ||
Що відбувається, коли об’єкти додаються`obj1 + obj2`,віднімаються `obj1 - obj2`або друкуються за допомогою `alert(obj)`? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Що відбувається, коли об’єкти додаються`obj1 + obj2`, віднімаються`obj1 - obj2` або друкуються за допомогою`alert(obj)`? | |
Що відбувається, коли об’єкти додаються(`obj1 + obj2`), віднімаються(`obj1 - obj2`) або друкуються за допомогою`alert(obj)`? |
І я не закінчив рев'ю |
Незнав, що Ви робите рев’ю. |
No description provided.