H
H
Hiroshima2020-08-27 07:52:55
Node.js
Hiroshima, 2020-08-27 07:52:55

Why is the ":" symbol highlighted in red?

5f473c5a9d368562986189.png
5f473c3e98701764835968.png

I use version 10.16.0, also tried 12.18.3, but the result is the same.

When hovering over an error (":") says "Expected"," . I did all this from the video https://www.youtube.com/watch?v=3aGSqasVPsI 34:00

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Didenko, 2020-08-27
@Hiroshima

The author of the video uses WebStorm, this is what the 'anything' handler looks like. Everything else is substituted by the code editor. Look only at what the author does, and not at what appears out of nowhere.

emitter.on('anything', data => {
  console.log()
})

V
Vladislav Lyskov, 2020-08-27
@Vlatqa

emitter.emit('anything', {a:1});
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question