Infinity represents a number too big for JavaScript to handle. There are special keywords, Infinity and -Infinity to represent the positive and negative infinities respectively. This concept is also depicted in the code snippet below:
var x =8/0;
console.log(x);//outputs Infinityvar y =-7/0;
console.log(y);//outputs -Infinity