its possible to write a single text file that is valid bash/dash/zsh/powershell and valid JavaScript all at the same time. It sounds impossible, but there is enough overlapping syntax that actually any javascript program can be converted into a valid bash script without mangling the JS code.
Unfortunately shell script is not as portable as you might be anticipating. Different distro run different shells, with different settings, and also different tools. Think BSD grep vs GNU grep.
Bro you're dealing with lemmygraders, they think the holodomor was nazi propaganda, and even so, all those Ukranians deserved it too.