Tip: When providing such a resource, it’s a good idea to properly format the code. You can do this by using three ` characters when starting and ending a code listing. E.g.
console.log( 'Hello world!' );
This will make your post much easier to read.