使用Number转化类型 for (let index = 0; index < Number(formData.answer?.split(';').length); index++) { ... }