From 22888aeca10b9b355e90635072b06125f1b1a8c1 Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Sun, 1 Dec 2019 16:25:58 +0300 Subject: [PATCH] minor fixes --- 1-js/99-js-misc/05-bigint/article.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/1-js/99-js-misc/05-bigint/article.md b/1-js/99-js-misc/05-bigint/article.md index 0ae13705..29c5e27d 100644 --- a/1-js/99-js-misc/05-bigint/article.md +++ b/1-js/99-js-misc/05-bigint/article.md @@ -48,7 +48,7 @@ alert(Number(bigint) + number); // 3 The conversion of bigint to number is always silent, but if the bigint is too huge and won't fit the number type, then extra bits will be cut off, causing a precision loss. ````smart header="The unary plus is not supported on bigints" -The unary plus operator `+value` is a well-known way to convert a `value` to number. +The unary plus operator `+value` is a well-known way to convert `value` to a number. On bigints it's not supported, to avoid confusion: ```js run @@ -56,6 +56,7 @@ let bigint = 1n; alert( +bigint ); // error ``` +So we should use `Number()` to convert a bigint to a number. ```` ## Comparisons