Nope.

(I was translating JavaScript rather than writing anew. It would certainly be more idiomatic.)