Learn JavaScript on the Now Platform: Lesson 24 - Common array methods

preview_player
Показать описание
Lesson 24 demonstrates some of the common things you can do with arrays to manage the elements they contain.

Рекомендации по теме
Комментарии
Автор

Another way to think about the splice position 2 is that the new items are added/inserted into the 3rd position (0, 1 and 2 - being an array count starts from zero) that was formerly occupied by Melanie. Hence Cary and Henri come in between Donna and Melanie in the 3rd and 4th position respectively.

praveenmurthy
Автор

11:33 - Just a note, he keeps forgetting slice is a "from - to" not a "from - how many places". He's getting nothing because slice(5, 1) has at start further on in the array (5) than the end (1). If you for some reason want to go out of bounds in the array, you need to select from the length of the array plus 1.

E.g. names.slice(arr.length +1, arr.length + 2);

Edit - btw, I do enjoy your videos though - thank you.

johnhio
Автор

Your explanation is just awesome. Chuck

nizamimohiyuddin
Автор

I couldn't understand the concept about using getValue instead of the object so you don't get the same sys_id in the array (13:45), could someone clarify to me?

fabriciofla
Автор

I tried to print the array in SErviceportal but it printed with "[]"enclosed. May be because I was returning the value from server side to client side.

vibhamadaan