最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Google Chrome JavaScript error - cannot call method 'join' of null - Stack Overflow

matteradmin8PV0评论

I started to test my web site on google chrome and

'cannot call method 'join' of null'

appears when doing this:

var sChoices = oQuestion.aChoiceRand.join("");

In IE and FF works well. What I'm trying to do with this code is to join all the aChoiceRand array elements in a string without any separators. How can I solve this?

I started to test my web site on google chrome and

'cannot call method 'join' of null'

appears when doing this:

var sChoices = oQuestion.aChoiceRand.join("");

In IE and FF works well. What I'm trying to do with this code is to join all the aChoiceRand array elements in a string without any separators. How can I solve this?

Share Improve this question edited Oct 6, 2020 at 12:55 Alex 1,5801 gold badge15 silver badges27 bronze badges asked May 16, 2009 at 7:42 bobyubobyu
Add a ment  | 

1 Answer 1

Reset to default 3

The problem's cause must be earlier, when oQuestion.aChoiceRand gets assigned: you think it's assigned to an array (and apparently IE and FF agree with you), Chrome is telling you that it's null instead. We can't really help without seeing the code that's supposed to assign oQuestion.aChoiceRand its value...

Post a comment

comment list (0)

  1. No comments so far