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

Conteúdo do Curso

Introduction to JavaScript (staging)

Introduction to JavaScript (staging)

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

bookBigInt 2/3

BigIntwith 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

Tarefa

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.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 25
toggle bottom row

bookBigInt 2/3

BigIntwith 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

Tarefa

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.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 25
toggle bottom row

bookBigInt 2/3

BigIntwith 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

Tarefa

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.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

BigIntwith 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

Tarefa

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.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 3. Capítulo 25
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
some-alt