In this lesson we'll learn two ways to construct a Regular Expression in Javascript, explore the methods available to us directly from the RegExp constructor, use Regular Expressions with String.prototype methods, and build a simple regex highlighter.
I especially like the little results viewer using
css
...nice!
How are you able to console.log() ["is", index: 5, input : "Is this This?"] from regex.exec(str)? I'm only able to log ["is"] without any of the other elements in the array
Nowadays, every suggest to use "let" instead of "var". But this video doesn't follow that, maybe because this video was made before "let" came to JavaScript ?!
Nowadays, every suggest to use "let" instead of "var". But this video doesn't follow that, maybe because this video was made before "let" came to JavaScript ?!
You are correct. This course was made before let
and const
were added into JavaScript.