第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

我的 javascript 中有一個(gè)錯(cuò)誤,它說(shuō) (e) 未定義

我的 javascript 中有一個(gè)錯(cuò)誤,它說(shuō) (e) 未定義

郎朗坤 2023-12-14 14:35:32
我的代碼和圖像中的錯(cuò)誤import React from 'react';const Main = () => {  const joiningCriteria = [    'People between the ages of 18 and 35 years.',    'A demonstrated passion for coding and technology.',    'The time and capacity to commit to a full coding bootcamp. Classes are three times per week in person at one of our learning hubs.',    'An intermediate level of English comprehension.',    'The aptitude to succeed in the selection process.',  ];  return (    <section class="bootcamp">      <ol>        {joiningCriteria.map(() => (          <li>{e}</li> /*the error is here it say the (e) is not defined*/        ))}      </ol>    </section>  );};export default Main;
查看完整描述

3 回答

?
largeQ

TA貢獻(xiàn)2039條經(jīng)驗(yàn) 獲得超8個(gè)贊

要使地圖正常工作,您必須傳遞一個(gè)允許選擇每個(gè)元素的變量。嘗試這個(gè)


const joiningCriteria = [


'People between the ages of 18 and 35 years.',

'A demonstrated passion for coding and technology.',

'The time and capacity to commit to a full coding bootcamp. Classes are three times per week in person at one of our learning hubs.',

'An intermediate level of English comprehension.',

'The aptitude to succeed in the selection process.',

];


return (


  <ol>        

      {joiningCriteria.map((e,index)=> {return <li key={index}>{e}</li>} /*the error is here it say the (e) is not defined*/

    )}

  </ol>

 

</section>

); };


查看完整回答
反對(duì) 回復(fù) 2023-12-14
?
慕桂英4014372

TA貢獻(xiàn)1871條經(jīng)驗(yàn) 獲得超13個(gè)贊

您需要將 e 作為參數(shù)添加到地圖中。然后,數(shù)組中的值將顯示為列表元素。

  <ol>        
      {joiningCriteria.map((e)=> (<li>{e}</li>))}
  </ol>


查看完整回答
反對(duì) 回復(fù) 2023-12-14
?
嗶嗶one

TA貢獻(xiàn)1854條經(jīng)驗(yàn) 獲得超8個(gè)贊

請(qǐng)將(e)添加到地圖中,例如

map(()=>

map((e)=>

會(huì)起作用的

謝謝


查看完整回答
反對(duì) 回復(fù) 2023-12-14
  • 3 回答
  • 0 關(guān)注
  • 205 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)