> A series of function calls that each do something and each returns a value.
Doesn't make it functional
> A function call that does something and returns a value,
Ah, so you don't know.
Here's what will actually happen:
TypeError: Can only call Document.getElementById on instances of Document
Because it's a method on an object. And you have to bind that method to a specific object instance before you can call it.
If it was functional this would never be the case. But since this is 90s-era OOP, you have to do this:
const function_reference = document.getElementById.bind(document);
function_reference("#id");