Since the release of the Advanced Topics course I have been hard at work on adding a section to that course on functional programming concepts as well as a new course on regular expressions. And now I have begun to think about what courses should come next, and I would like your input. Here are a list of some of the courses sitting in the wings. (You can get a full list of upcoming topics here.)
jQuery. Yes, jQuery is not the darling child anymore, but it is still used extensively, so it is important to know how to use it effectively.
So which topics are most important to you? Let me know in the comments sections.
I now feel like I get it. I understand the power behind the paradigm. I understand the concepts. And…I must admit that I like it.
Here is the problem with sort. Lets say I have an array of strings like this:
let things = [‘Building’, ‘Car’, ‘house’, ‘tree’, ‘bicycle’, ‘automobile’];
It will not sort correctly if I use:
The reason is that I have a mixture of upper and lowercase characters. The uppercase characters will sort first and we end up with this.
The solution is pretty simple; we just need to sort with the correct case. However, executing on that solution is not quite as simple. There are a number of different ways to do this. In the tutorial I chose to take advantage of a little known feature of sort; you can pass in a function to the sort method that can be used to determine the sort order. That makes sort a higher order function, and that was the reason I was using it as an example in the tutorial.
The end result is kind of cool.
If you would like to understand higher order function better or you are interested in the sort solution, take a look at this tutorial.