Model.Choices is a string array in my MVC3 view. My question is, how can I get a JavaScript string array from it? If you do something like:
var choices="@Model.Choices";
alert(choices);
alert(choices[1]);
The message will be "choice1choice2choice3choice4" and "undefined"
What is the syntax I need to have to have choices turn into a string array in JavaScript? For example:
alert(choices[0]);
alert(choices[1]);
Should output "choice1", and "choice2".