DEV Community

Discussion on: A JavaScript interview question asked at Google

Collapse
 
greencoder profile image
Vincent Cantin

You could also have used a Set, assuming that functions are added only one.