idiomatic JavaScript