Crypto is an library in Javascript. Thats why there is a problem i guess.
I tried replacing crypto with other words and it worked fine.
delete crypto
var crypto = "mystring"
console.log("crypto = " + crypto) // crypto = mystring
crypto. This library is an object oriented cryptography toolkit that implements several fundamental cryptographic algorithms including TWOFISH, SERPENT, RIJNDAEL, RSA with key-generation and SHA(SHA-1,224,256,384,512) for JavaScript. ... The unique feature of this library is asynchronous processing.