I'm looking at the following Javascript code, trying to port it to another language:
if (x>n) {return q} {return 1-q)
I don't know what the code is doing, but can someone tell me based on syntax what occurs? Is there an implied 'else' before the last set of {}? That is, if x>n then return q otherwise return 1-q?
If it helps, here's the line of code it was embedded within:
if(x>9000 | n>6000) { var q=Norm((Power(x/n,2/5)+1/(8*n)-1)/Sqrt(9/(2*n)))/3; if (x>n) {return q}{return 1-q} }
thanks
if (1>2) {1} {2}prints 2, all good.if (3>2) {1} {2}prints 2... OK...?if (3>2) {1} else {2}prints 1.