Now that we've investigated the Browser component of MooTools, let's check out the Core component.
The Core component contains a plethora of useful functions (15 of them to be exact) that many JavaScript developers believe should have been in native JavaScript. You'll find functions that will check if an object is defined, functions that work with date and time, and a hodgepodge of miscellaneous functions that will save you a lot of code-writing.
Let's delve into the Core by exploring all of its functions.
You can often run into trouble when an object you're trying to access in your script is null or undefined. Because JavaScript allows you to create empty objects and create them on-the-fly without declaring them first, you'll often need to check if an object you're trying to use contains something.
This leads to a lot of if/else
statements and try/catch
methods. Let MooTools do all the hard work by leveraging some...