Automatic Semicolon insertion - reg

Is there a way to display automatic semicolon insertion in console.log method ?

Do you mean: every time the parser automatically inserts a semicolon, have it call console.log?

1 Like

Almost Yes.one example from stack overflow:


> f2 = (x) => {
>     return /*
>              Comment on x.
>            */ x
> }
> console.log(f2(2));

Now it says undefined. ok. Anyway to display the js back side work of asi?

No, but you can (and should) use a linter (ie, eslint) to flag cases where semicolons are missing.

1 Like

Thank you. I will install and check it.