A rather amusing JavaScript counterpart