no, there’s nothing wrong with that at all, and in js, it’s usually a good thing . the inside functions may not be a pure function, if they rely on closure variables. If you don’t need a closure or don’t need to worry about polluting your namespace, write it as a sibling.