Im trying to add custom JS in my new theme.
I managed to add custom css in default_head_blocks.xml
Like this:
<css src="css/customtheme.css" />
<css src="css/styles-m.css" />
<css src="css/styles-l.css" media="screen and (min-width: 768px)"/>
<css src="css/print.css" media="print" />
Now i tried to do the same with javascript:
<script src="js/javascript.js" />
To test it i added this code in js/javascript.js:
alert('test!');
But sadly nothing. What is the corrrect way to include javascript in a custom magento 2 theme?
Thanks in advance,
-Kevin