آموزش مقدماتی جاوا اسکریپت 2024| ARRAYS| قسمت 25

تعداد بازدید : 16 | تاریخ انتشار : 11 اردیبهشت 1403 15:44 | مدت زمان : 00:08:05 | دسته بندی : فناوری و رایانه

در این دوره آموزشی قصد داریم تا شما را با اصول برنامه نویسی با زبان قدرتمندJavaScript اشنا کنیم. این مجموعه آموزشی یک مجموعه کامل برای آموزش زبان برنامه نویسی JavaScript است . 00:00:00 arrays 00:01:06 index 00:02:16 array methods 00:03:07 .length 00:03:41 .indexOf 00:04:33 iterate an array 00:06:34 enhanced for loop 00:07:18 sort 00:07:29 reverse sort 00:07:44 conclusion // array = a variable like structure that can // hold more than 1 value let fruits = ["apple", "orange", "banana", "coconut"]; //fruits.push("coconut"); //add an element //fruits.pop(); //removes last element //fruits.unshift("mango"); //add element to beginning //fruits.shift(); //removes element from beginning let numOfFruits = fruits.length; let index = fruits.indexOf("coconut"); //console.log(fruits); //console.log(fruits[0]); //console.log(fruits[1]); //console.log(fruits[2]); //console.log(fruits[3]); //console.log(numOfFruits); //console.log(index); //fruits.sort(); //fruits.sort().reverse(); for(let fruit of fruits){ console.log(fruit); }