GNOME uses a lot of JavaScript nowadays, so large parts of an application can be interpreted. Here are the GJS docs, it gives you an idea of how much JavaScript there is: https://gjs-docs.gnome.org/
Does Elementary use Gnome? I thought it was something else. It's been years since I've been on Elementary, but it didn't feel like it was just a Gnome skin iirc.