Why I can't usr arr.indexOf() with javascript

Posted by Vajet on Mon 14 Sep 2015 12:30 PM — 2 posts, 15,447 views.

#0
var dpr="w|n|e|s|sw|nw|ne|se|wd|nd|ed|sd|d|u|wu|nu|eu|su|out|enter"
Note(dpr.split("|").indexOf("wd"))
----------------------------
I write this js code, but it not running
Who can tell me why
Australia Forum Administrator #1
I'm no Javascript expert but it seems that the result of split is an array:

http://www.w3schools.com/jsref/jsref_split.asp