Passing variable from ejs to js script
问题 I am trying to pass a variable from ejs to JavaScript function but keep getting undefined in output. Here is the code. It is supposed to render a table with file names and clicking on each file name should later redirect to a page which would render the file in the browser but I can't proceed without passing the parameter to URL. <% if (files.length > 0) {%> <table class="table table-hovered"> <thead class="thead-light"> <tr> <th scope="col">No</th> <th scope="col">File</th> <% files.forEach(