How to use javascript with markdown?

I would like to use custom javascript code on my dashboard.

Custom HTML code could be used with Markdown card. In accordance with the doc, it uses Marked.js. Its doc says it uses CommonMark 0.30. Moreover, HTML blocks functionality is fully supported. JavaScript is part of HTML blocks.

But it doesn’t work when I try -