Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
BigInt 2/3 | Data Types and Variables
Introduction to JavaScript (staging)
course content

Зміст курсу

Introduction to JavaScript (staging)

Introduction to JavaScript (staging)

1. Introduction
2. JavaScript syntax
3. Data Types and Variables

BigInt 2/3

<code class="go3679463865">BigInt</code>with Math Operators

We can use most of the math operators with BigInt just like we do with numbers, for example.

1
console.log(11n + 22n);
copy

A BigInt number and a regular number cannot be used together for performing some arithmetic operations, for example.

1
console.log(100n + 200);
copy

For this, we have to convert the number into a BigInt number explicitly by calling the BigInt(), for example.

123
let bigint = 100n; let number = 200; console.log(bigint + BigInt(number));
copy

Завдання

A BigInt number named bigNumber with the assigned value of 12345n has been given to you. Your task is to:

  • Create a new variable named number and store 55 in it.
  • Convert the number to a BigInt number using the BigInt() function and store the result again in number.
  • Display the sum of these values.

Завдання

A BigInt number named bigNumber with the assigned value of 12345n has been given to you. Your task is to:

  • Create a new variable named number and store 55 in it.
  • Convert the number to a BigInt number using the BigInt() function and store the result again in number.
  • Display the sum of these values.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 3. Розділ 25
toggle bottom row

BigInt 2/3

<code class="go3679463865">BigInt</code>with Math Operators

We can use most of the math operators with BigInt just like we do with numbers, for example.

1
console.log(11n + 22n);
copy

A BigInt number and a regular number cannot be used together for performing some arithmetic operations, for example.

1
console.log(100n + 200);
copy

For this, we have to convert the number into a BigInt number explicitly by calling the BigInt(), for example.

123
let bigint = 100n; let number = 200; console.log(bigint + BigInt(number));
copy

Завдання

A BigInt number named bigNumber with the assigned value of 12345n has been given to you. Your task is to:

  • Create a new variable named number and store 55 in it.
  • Convert the number to a BigInt number using the BigInt() function and store the result again in number.
  • Display the sum of these values.

Завдання

A BigInt number named bigNumber with the assigned value of 12345n has been given to you. Your task is to:

  • Create a new variable named number and store 55 in it.
  • Convert the number to a BigInt number using the BigInt() function and store the result again in number.
  • Display the sum of these values.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 3. Розділ 25
toggle bottom row

BigInt 2/3

<code class="go3679463865">BigInt</code>with Math Operators

We can use most of the math operators with BigInt just like we do with numbers, for example.

1
console.log(11n + 22n);
copy

A BigInt number and a regular number cannot be used together for performing some arithmetic operations, for example.

1
console.log(100n + 200);
copy

For this, we have to convert the number into a BigInt number explicitly by calling the BigInt(), for example.

123
let bigint = 100n; let number = 200; console.log(bigint + BigInt(number));
copy

Завдання

A BigInt number named bigNumber with the assigned value of 12345n has been given to you. Your task is to:

  • Create a new variable named number and store 55 in it.
  • Convert the number to a BigInt number using the BigInt() function and store the result again in number.
  • Display the sum of these values.

Завдання

A BigInt number named bigNumber with the assigned value of 12345n has been given to you. Your task is to:

  • Create a new variable named number and store 55 in it.
  • Convert the number to a BigInt number using the BigInt() function and store the result again in number.
  • Display the sum of these values.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

<code class="go3679463865">BigInt</code>with Math Operators

We can use most of the math operators with BigInt just like we do with numbers, for example.

1
console.log(11n + 22n);
copy

A BigInt number and a regular number cannot be used together for performing some arithmetic operations, for example.

1
console.log(100n + 200);
copy

For this, we have to convert the number into a BigInt number explicitly by calling the BigInt(), for example.

123
let bigint = 100n; let number = 200; console.log(bigint + BigInt(number));
copy

Завдання

A BigInt number named bigNumber with the assigned value of 12345n has been given to you. Your task is to:

  • Create a new variable named number and store 55 in it.
  • Convert the number to a BigInt number using the BigInt() function and store the result again in number.
  • Display the sum of these values.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 3. Розділ 25
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt