I have a function inside a js file namded helper.js. I have already acessed this file and called the function inside my EJS on page load. However I cannot get my onClick button to call the function. Any help with this problem is much appreciated. Here is the EJS file code:
<button onClick= "<%helper.openNav()%>" class = "bro"> Click me </button>
Here is the function inside the helper.js file:
function openNav(){
console.log('hello')
}
;
module.exports = {
openNav: openNav,
}