Question · JavaScript and TypeScript course · Module 2: Functions, Arrays and Objects
BigInt Data Type
How do you correctly create a BigInt representing the number of years since the dinosaurs went extinct?
Answer options
- const years = 65000000n;
- None of the options is correct
- const years = BigInt(65000000);
- Both options are correct
Show the answer
Correct answer:
- Both options are correct