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

Contenido del Curso

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

Tarea

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.

Tarea

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

Sección 3. Capítulo 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

Tarea

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.

Tarea

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

Sección 3. Capítulo 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

Tarea

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.

Tarea

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

<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

Tarea

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 3. Capítulo 25
Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
We're sorry to hear that something went wrong. What happened?
some-alt