new solution addresses the possibility of first letter of arg "before" being lower case and needing to change the first letter of "after" from capital to lowercase
solution more streamlined
added resource to help with regular expressions
The first advanced solution is almost identical to the intermediate one. Per "similar but better" rule, I believe the first one should be kept (or at the bare minimum, they should at least fill the same category).
* Extend solution explanation
The explanation for the advanced code solution was a little cumbersome.
It tried to explain the used method, but also tried to explain an alternative solution, both mixed together.
To fix that, I moved everything related to the alternative solution to another paragraph.
Additionally, I added a more detailed explanation about this alternative solution.
Hopefully, with this fixes, both solutions will be clearer to the user.
* Replace intermediate solution
Replace the intermediate solution with a more concise one.
I took the opportunity to eliminate the indenting in all 3 snippets to remove unnecessary blank space on the left.
I also changed the wording on one of the instructions and fixed a typo.
* Remove external links
* Simplity regex declaration
I replaced `new RegExp()` in order to make the solution cleaner and shorter
* Update index.md
* A clearer, more readable return statement
Use .filter() to get the odd values in array.
Use .reduce() to sum.
Two separate tasks, one line, easier to read and understand.
Updated comments and Code Explanation accordingly.
* simplifying the mathematical solution
We don't need to sort the two number array, using Math.abs() we can get the count of the numbers in range and calculate the sum.
* Remove previously relevant info regarding sort()
* Clarify code for better readability
* change let to const according to review
* added missing semicolon
* Solution for Intermediate Algorithm Scripting: Pig Latin
Solution exclusively utilizes regex and string functions
Username: finally_static
* Properly format sublists
* sublists
* sublists
* sublist
* fix: added #2 to existing Intermediate solution
* Create a number for first intermediate solution
Intermediate code solution doesn't pass tests when the greater number is even because it's the starting acc without passing the reducer function that avoids even number.
Proposed solution: reverse the array before reduce.
* Translate challenge subtitles and example challenge text to Spanish
* Corrected errors in syntax and punctuation
* Multiple corrections of it/s to its plus other grammar corrections
* Correction and added paragraph to CSS Flex article
* Corrected my own typo
* Corrected capitalization, American spellings and typos
* Optimized advanced solution
Made 2 minor improvement to the advanced solution:
1. The original advanced solution used `Math.max` and `Math.min` against the supplied array, this causes the values in the supplied array to be compared twice. If we use sort instead, the values are only compared once and we can target the max and min values using an index. This is more efficient.
2. The original solution caused `lcm(min, min + 1)` to be evaluated twice. By incrementing `min` the first time we run `lcm` we avoid this duplication and also by taking advantage of the prefix increment operator ++ in the while loop, we trim a line.
* Fixed extra spaces in code block
* Incorporated code feedback from #19572
Made the following changes to the advanced code solution:
- Converted helper functions to arrow function constants
- Simplified comments
- Used destructuring and `sort` for `min` and `max`
* Fixed spacing.