Duration: 15 minutes
Summary: In this video we wrap up the current Array discussion. As you saw we can use arrays in many different ways. In the previous video, I showed you how to use arrays as queues (FIFO, First In First Out). Here we continue the discussion to see how we can remove elements from the array. The pop function removes an element from the end of the array. The shift function removes an element from the beginning of the array. Also we introduced the sort function. We saw how sort behaves by sorting elements alphabetically even when the array is an array of numbers. We added couple of methods as helper methods: (1) Compare function that compares two numbers and (2) ReverseCompare compares the numbers in reverse order. By providing these functions as parameters to the sort function, now we can sort the number in the order we intended.
Methodology of the development of example: Good coding standard and simplified design.
Technology Used: JavaScript – Core language Concepts
Keywords: JavaScript, HTML, function, var, script, document, writeln, pop, shift, sort.












See the prices for this post in Mr.Bool Credits System below: