Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (anonymous):

JavaScript I have looked online for a script that checks if a multidimensional array item exists but none work,...

OpenStudy (anonymous):

if($y>30){ if($xarr[$x][$y-5]=='log'){ <-- is the problem specifically "$xarr[$x][$y-5]" if($xarr[$x][$spawn.dirts+1]=='log'){ $push='log'; } } }

OpenStudy (anonymous):

someone plese help on my question

OpenStudy (rsmith6559):

For starters, that isn't JavaScript. JavaScript doesn't refer to variables with a dollar sign. if( xarr[ x ][ y - 5 ] === "log" ) { // do something } should work, and yes I used 3 equal signs in the comparison.

OpenStudy (anonymous):

it is javascript, it supports starting variables with dollar signs, makes PHP to javascript easier... @rsmith6559

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!