I\'m pretty confused with how to mix razor and js. This is the current function I am stuck with:
A non conventional method to separate javascript from the view, but still use razor in it is to make a Scripts.cshtml file and place your mixed javascript/razor there.
Scripts.cshtml
Index.cshtml
Click me @section scripts { @Html.Partial("Scripts") }