JS PATTERN MATCH: Implement pattern match in JS.
Open develop tools for more details.