pcs javascript