Browser Extension’s creating dynamic buttons with dynamic links

I’m trying to create a browser extension popup (in JS) that creates a number of buttons with links that open up different webpages. The function takes a number of parameters, the main one being b_link …

Allow either named arguments or positional arguments in Javascript

How can I have a function accept either named arguments (foo({a: ‘hello’, b: ‘it is me’})) or positional arguments (foo(‘hello’, ‘it is me’))? I understand that named arguments can be simulated by …

Is it possible to change the value of the function parameter?

I have one function with two parameters, for example function (a,b). I want to within the function, take the value of b, and replace that with c. I was thinking of something like $(b).replaceWith(c), …