Doing them I got more familiar with making pure functions and having fewer side-effects on my code. Also worked on my exception handling skills.
I'm happy that I worked on these as I have a bad habit of not finishing my projects.
- Using the slice method instead of splice
- Getting more comfortable with this
- Concatenating strings and arrays
- Using reduce method on arrays
- Using the sort method
- Using forEach, every and some
- Introduction to arity and currying
- Exception handling
- try and catch
- Using finally statement
- Selective error catching
Task 'FCC'. Elapsed time: 1 h 1 min 40 s
Task 'Reading_EJS'. Elapsed time: 0 h 25 min 45 s
Task 'EJS_exercises'. Elapsed time: 0 h 22 min 11 s
"Mistakes and bad input are facts of life. An important part of programming is finding, diagnosing, and fixing bugs. Problems can become easier to notice if you have an automated test suite or add assertions to your programs.
Problems caused by factors outside the program’s control should usually be handled gracefully. Sometimes, when the problem can be handled locally, special return values are a good way to track them. Otherwise, exceptions may be preferable.
Throwing an exception causes the call stack to be unwound until the next enclosing try/catch block or until the bottom of the stack. The exception value will be given to the catch block that catches it, which should verify that it is actually the expected kind of exception and then do something with it. To help address the unpredictable control flow caused by exceptions, finally blocks can be used to ensure that a piece of code always runs when a block finishes."
End of summary. You can find the original from here
Thank you for reading and see you all tomorrow!