TypeError Cannot mix BigInt and other types, use explicit conversions solved Javascript BigInt Type

preview_player
Показать описание
In Javascript we have BigInt data type which is a primitive Data type.When we write code with BigInt data type values , we may face an error TypeError Cannot mix BigInt and other types, use explicit conversions

This video explains how to fix TypeError Cannot mix BigInt and other types, use explicit conversions in Javascript.I explain two methods to fix the TypeError error related to BigInt

let num1 = 10n

let sum = num1 + 5;

Method1

let num1 = 10n

let sum = num1 + BigInt(5);

Method2

let num1 = 10n

let sum = num1 +5n;

If you face the same TypeError Cannot mix BigInt and other types, use explicit conversions error in your coding journey,then this video will be helpful for you
Рекомендации по теме
visit shbcf.ru