What would be the old JS way of doing this?