I have a variable in my app.js and I want to print it in my HTML page without erease the other text of the page.
Example :
var test = 'hello';
Here I just want to print hello in my index.ejs page.
var test = 'hello';
is a variable that you declared it in the app.js. You can print it through the console as console.log(test) If you want to print it in your html template, it has to be an object. {test: 'hello'} can be printed as {{test}} in your ejs html template.Take a look at the documentation of ejs template engine.
res.render("index", {text: "hello"});