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

Course Content

Introduction to JavaScript (staging)

Introduction to JavaScript (staging)

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

BigInt 1/3

BigInt:

In JavaScript, we have a BigInt data type in which we can assign the integer of arbitrary length to an integer.

We can create BigInt by placing the n at the end of the integer or we can simply call the BigInt() function that creates an integer of arbitrary length from a string.

123456789
let bigint = 123456789n; console.log(bigint); let bigintFromString = BigInt("123456789"); let bigintFromInteger = BigInt(123456789); console.log(bigint); console.log(bigintFromString); console.log(bigintFromInteger);
copy

Task

Create a BigInt() from the string “982945944” by using the BigInt() function and store it in the variable netWorth and display the value on the console.

Task

Create a BigInt() from the string “982945944” by using the BigInt() function and store it in the variable netWorth and display the value on the console.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Section 3. Chapter 24
toggle bottom row

BigInt 1/3

BigInt:

In JavaScript, we have a BigInt data type in which we can assign the integer of arbitrary length to an integer.

We can create BigInt by placing the n at the end of the integer or we can simply call the BigInt() function that creates an integer of arbitrary length from a string.

123456789
let bigint = 123456789n; console.log(bigint); let bigintFromString = BigInt("123456789"); let bigintFromInteger = BigInt(123456789); console.log(bigint); console.log(bigintFromString); console.log(bigintFromInteger);
copy

Task

Create a BigInt() from the string “982945944” by using the BigInt() function and store it in the variable netWorth and display the value on the console.

Task

Create a BigInt() from the string “982945944” by using the BigInt() function and store it in the variable netWorth and display the value on the console.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Section 3. Chapter 24
toggle bottom row

BigInt 1/3

BigInt:

In JavaScript, we have a BigInt data type in which we can assign the integer of arbitrary length to an integer.

We can create BigInt by placing the n at the end of the integer or we can simply call the BigInt() function that creates an integer of arbitrary length from a string.

123456789
let bigint = 123456789n; console.log(bigint); let bigintFromString = BigInt("123456789"); let bigintFromInteger = BigInt(123456789); console.log(bigint); console.log(bigintFromString); console.log(bigintFromInteger);
copy

Task

Create a BigInt() from the string “982945944” by using the BigInt() function and store it in the variable netWorth and display the value on the console.

Task

Create a BigInt() from the string “982945944” by using the BigInt() function and store it in the variable netWorth and display the value on the console.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

BigInt:

In JavaScript, we have a BigInt data type in which we can assign the integer of arbitrary length to an integer.

We can create BigInt by placing the n at the end of the integer or we can simply call the BigInt() function that creates an integer of arbitrary length from a string.

123456789
let bigint = 123456789n; console.log(bigint); let bigintFromString = BigInt("123456789"); let bigintFromInteger = BigInt(123456789); console.log(bigint); console.log(bigintFromString); console.log(bigintFromInteger);
copy

Task

Create a BigInt() from the string “982945944” by using the BigInt() function and store it in the variable netWorth and display the value on the console.

Switch to desktop for real-world practiceContinue from where you are using one of the options below
Section 3. Chapter 24
Switch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt