I have an ejs code to create a temp vector.
<% var temp=[];
for (i = 0; i < his.length; i++) {
temp[i]= his[i].temp;
};%>
The variable "his" comming from the server then inside a script tag i have this.
var tempe = <%= temp; %>
console.log(tempe);
I got the SyntaxError: missing variable name
what can I do?
Note: Mozilla debugger shows tempe as
tempe= 76,74,24,29,69,59,44`
for (var i...)?