I have a scores array in my database.
I want to extract maximum value from that array in my ejs webpage.
I am not sure but tried the following code:
<div>
<%-Math.max(user.scores)%>
</div>
This not giving the desired result.
For eg if the scores array is [1, 4, 99, 2, 7], it should give me 99 on my webpage.