How to modify a default parameter in a javascript function, knowing that the previous parameters must remain default?
function f(a = 'a', b='b', c='c') {
return [a, b, c];
}
f( c ='some value here'); //must return ['a', 'b', 'some value here']
I want something similar to what can be done in python.
def f(a = 'a', b = 'b', c ='c'):
return [a, b, c]
f(c = 'some value here') #will return ['a', 'b', 'some value here']
Is there any way to do this ?