Amending jsdoc comment on swap()

Thanks to Gectou4 for pointing out this issue