Title: Introduction to jQuery -Utilities 2
Description: In this video, I start the discussion of jQuery utility functions (like each and grep). We create an empty list which get populated by an array and the each() utility. Then, we display the content of the array on the screen using the join function. join() takes a parameter to specify the elements seperator when joining. In our case, we used a comma and a space. Then we explain how to use the grep utility: In our example grep takes the shopping elements array, and a function that retrieves only the elements starting with 'C', as parameters. The results are stored in the shopping element array itself. Then we used join to display the contents of the array.
Methodology: Using jQuery library.
Examples constructed: We create an example that contains an empty ordered list. The list will be populated through an array and jQuery.each function. Then, we used grep to create an array that contains all the elements in the shopping items that start with the letter 'C'. We used join to display the elements.