JavaScript error in Google Chrome - cannot call "join" method from null
I started testing my website on google chrome and "can't call method". join join of null appears with this:
var sChoices = oQuestion.aChoiceRand.join("");
Works well in IE and FF. What I am trying to do with this code is to concatenate all the elements of the "aChoiceRand" array in a string without any delimiters. How can I solve this?
0
bobyu
a source
to share
1 answer
The cause of the problem must be before when it oQuestion.aChoiceRand
is assigned: you think it is assigned to an array (and IE and FF seem to agree with you), Chrome tells you that it is null instead. We can't help without seeing the code that should assign oQuestion.aChoiceRand
its value ...
+3
a source to share