DEV Community

loading...

Discussion on: ELI5: Why use a function declaration, expression, or an IIFE in JavaScript?

Collapse
gmartigny profile image
Guillaume Martigny

Hey, I just want to point out that you can do the same with:

const faces = "😀😃😄".match(/.{2}/g);
Enter fullscreen mode Exit fullscreen mode

😎

Forem Open with the Forem app