👩💻 Join our community of thousands of amazing developers!
A function in JavaScript is a set of statements that performs a task or calculates a value and return it based on the input which is been given to it. For instance, let’s say I have this User function which accepts different arguments and logs those details into the console. const User = (name, age) => { console.log(name, age) }; And you can call it like so. User('Amit', '30'); // 'Amit' '30' Simple, no? But there is a problem over here and that is by looking at the function call, you ...