by franciscop · 5y ago · 0 comments
def hello(a, b = 'world'):
print(a, b)
hello('hello')
hello('hello', 'world')
But these don't, so fair point: hello('hello', 'world', 'there)
# nor
def hello(a):
...
hello('hello', 'world')In python those functions would look like:
def F(a = None, b = None, *args): ...
And you can't write any other kind of function in javascript. I don't really like that aspect of javascript, it creates so many hard to debug situations.