Использование сервера передаваемых значений и клиента JS вместе в EJS
<% var test = 101; %> // variable created by ejs
<script>
var getTest = <%= test %>; //var test is now assigned to getTest which will only work on browsers
console.log(getTest); // successfully prints 101 on browser
</script>
Pleasant Pelican