Yesterday I was working with a Sqlite database and I wanted to call db.close() every time a particular class went out of scope. This is a pretty common pattern across programming languages - RAII via destructors in C++, with statements in Python, the Drop trait in Rust – so I was slightly surprised that JavaScript doesn’t have a similar pattern.