آموزش مقدماتی جاوا اسکریپت| ARRAYS of OBJECTS| قسمت 48

تعداد بازدید : 7 | تاریخ انتشار : 16 اردیبهشت 1403 14:23 | مدت زمان : 00:10:00 | دسته بندی : فناوری و رایانه

در این دوره آموزشی قصد داریم تا شما را با اصول برنامه نویسی با زبان قدرتمندJavaScript اشنا کنیم. این مجموعه آموزشی یک مجموعه کامل برای آموزش زبان برنامه نویسی JavaScript است . 00:00:00 array of objects 00:01:29 access object properties 00:02:19 push() 00:02:59 pop() 00:03:11 splice() 00:03:28 forEach() 00:04:08 map() 00:05:18 filter() 00:07:09 reduce() const fruits = [ {name: "apple", color: "red", calories: 95}, {name: "orange", color: "orange", calories: 45}, {name: "banana", color: "yellow", calories: 105}, {name: "coconut", color: "white", calories: 159}, {name: "pineapple", color: "yellow", calories: 37}]; // Access properties of a fruit object console.log(fruits[0].calories); // Add a new fruit object fruits.push({ name: "grapes", color: "purple", calories: 62}); // Remove the last fruit object fruits.pop(); // Remove fruit objects by indices fruits.splice(1, 2);