Javascript can't handle numbers that large. It can handle numbers with that magnitude, but not with that precision.
A number in Javascript is a floating point number, with about 15 digits precision. If you make a random number close to a googol, it would just be 15 digits at the start, then up to 85 zeroes at the end.
To create that large a number, you need to make several random numbers and put together the digits to form a large number. Example:
var s = '';
for (var i = 0; i < 10; i++) {
s += Math.floor(Math.random() * 1e10);
}
while (s.length > 1 && s[0] == '0') s = s.substr(1);