Help on understanding JS

Posted by Anonymous on Stack Overflow See other posts from Stack Overflow or by Anonymous
Published on 2010-04-08T20:28:12Z Indexed on 2010/04/08 20:33 UTC
Read the original article Hit count: 294

Filed under:
|
|
|

I have thos piece of code:

Math&&Math.random?Math.floor(Math.random()*10000000000000):Date.getTime();

And as far as i know && is logic operator for AND, so im trying to convert this into PHP and this is where i got:

intval(floor(time()/10800000)%10+(rand()?floor(rand()*10000000000000):time()))

The problem is that i can't understand the first part

Math&&

Can anyone help with this one cause i always get negative result, when i should get positive (probably the logic rand-time is not working in my php example)

© Stack Overflow or respective owner

Related posts about js

Related posts about php