I don't know if this is a dumb question, but i will ask it anyways.
I saw in a javascript course that we can use the bind method on functions to create basically the same functions but more specific. So like this for example:
const addTax = (rate, value) => value + value * rate;
null because we don't need this
const addVAT = addTax.bind(null, 0.23);
So basically what we're doing here is that we create a new function called addVAT based on the addTax function but the difference is that we set the rate hardcoded at 0.23.
Now to my question: Since functions are objects and objects are passed by reference, shouldn't the addTax function become now the addVAT function because they both point to the same reference, just like here?:
const person = {
name: 'test',
};
const person1 = person;
person1.age = 20;
Because when we initalize person1 to person and when we add the property age to person1 it also adds to person