Not sure why but separation of concers was hammered so hard for a while that I cannot accept any inlined javascript or css at all. For me the reason is clear, I do not need to scan the html to know what a particular piece of code is doing and will just assume these ids are somewhere out there.
The first example of the site would become:
<div>
<h2>You clicked {count} times!</h2>
<button id='decrement'>Decrement</button>
<button id='increment'>Increment</button>
<script>
count = 0
$('button#increment').on('click', () => { count++ })
$('button#decrement').on('click', () => { count-- })
</script>
</div>