Showing posts from August, 2020

[JavaScript] Return an array with only even numbers

We take advantage of the built-in filter function.

[JavaScript] Checking if a letter is alphabetic without Regex

We return whether or not the upper case version of a character is equal to the lower case version of a character. If the character was a space or a punctuation symbol such as a comma or period, this function would have returned true because toUppercase() and toLowerCase() has no effect on these specific characters. This implies that the character we are checking is not alphabetic.