Para retornar o terceiro elemento do array "arrayNumber", você pode usar o seguinte código:

const arrayNumber = ["0", "1", "2", "4"];
console.log(arrayNumber[2]);

O índice do array começa em 0, então o terceiro elemento está no índice 2. Portanto, arrayNumber[2] retorna "2".

como retornar a 3 possocap deste array const arrayNumber = 0 1 2 4;consolelogarrayNumber3;

原文地址: https://www.cveoy.top/t/topic/jglh 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录