Regular Expressions explained!

Regular expressions (“regexes”) are supercharged Find/Replace string operations. Regular expressions are used when editing text in a text editor, to: check whether the text contains a certain pattern find those pattern matches, if there are any pull information (i.e. substrings) out of the text make modifications to the text. Note: Unless otherwise specified, regular expressions are case-sensitive. However, almost all implementations provide a […]

Closures

What is a closure? A closure is an inner function that has access to the outer (enclosing) function’s variables—scope chain. The closure has three scope chains: it has access to its own scope (variables defined between its curly brackets), it has access to the outer function’s variables, and it has access to the global variables. […]