I am trying to passe an array from ejs to JavaScript. I can get to the values inside ejs but not from JavaScript. all the time i get undefined because the contents of the variab
Use this it will work fine.(Don't use single quotation )
var test = <%-JSON.stringify(level_tab) %>; console.log("test :"+test);