Hello I am not very good at javascript, and I am trying to save the value returned from
(Math.random() + '') * 1000000000000000000 + '?'
Inside a cookie using: document.cookie
So far I have this:
document.cookie="rand="(Math.random() + '') * 1000000000000000000 + '?'";path=/";
But it is just storing (Math.random() + ”) * 1000000000000000000 + ‘?’ as a string and not actually using it to compute a value, can some please explain where I am going wrong?
1 Answer