Добавить
Уведомления

Well-Known Symbols - Symbol.toPrimitive | JSer - JavaScript Engineer

when converting data to primitive, [Symbol.toPrimitive]() is first checked, then based on which is needed, valueOf() and toString() are accordingly respected. details could be found here: https://javascript.info/object-toprimitive Hi I'm a JavaScript engineer who is not good at algorithms, and currently practicing leetCode & BFE.dev. If you are interested, maybe we can learn together.

12+
16 просмотров
2 года назад
12+
16 просмотров
2 года назад

when converting data to primitive, [Symbol.toPrimitive]() is first checked, then based on which is needed, valueOf() and toString() are accordingly respected. details could be found here: https://javascript.info/object-toprimitive Hi I'm a JavaScript engineer who is not good at algorithms, and currently practicing leetCode & BFE.dev. If you are interested, maybe we can learn together.

, чтобы оставлять комментарии