swift vs javascript