loading...

re: Keyword arguments in JavaScript VIEW POST

FULL DISCUSSION
 

Unpack an object? :S
I don't really understand what do you need, but you can Object.keys() to iterare the keys of an object.

 

If you know Python, then you know you can do:

def func(**kwargs):
    print(kwargs)
func(hello="Hi!") # {"Hello": "Hi!"} bc it an Object
 

Yes, i knew. The last answer of Phil it's a good approximation of what do you want to do. Hope it helps :)

code of conduct - report abuse