Construct's event system is itself implemented in JavaScript. So JavaScript code can do everything the event system can and more. It's a strict superset. So there are lots of things you can do in JavaScript that aren't possible in events, such as using browser APIs that are not exposed in the event system.
The main advantage of event blocks is they are very quick and easy to set up. There are things event blocks can do in a few clicks that could take you weeks and weeks of very difficult programming to achieve in JavaScript. So naturally it's a trade-off.