1

I have 2 console.log commands in the multiline firefox console and I execute them (cntrl+enter). It looks like there is only 1 undefined return value but this value is either after the first log or the second log - (I assume it is random or 'asynchronous'). Aside: during the question my tab crashed in firefox - seemingly the second time I've seen this recently.

console.log("hello")
console.log("sailor")

enter image description here

JoePythonKing
  • 1,080
  • 1
  • 9
  • 18
  • See https://stackoverflow.com/questions/24342748/why-does-console-log-say-undefined-and-then-the-correct-value – JustRaman Jan 03 '21 at 10:18
  • 2
    Does this answer your question? [Why does console.log say undefined, and then the correct value?](https://stackoverflow.com/questions/24342748/why-does-console-log-say-undefined-and-then-the-correct-value) – JustRaman Jan 03 '21 at 10:19
  • 1
    @JustRaman I don't think it answers the question. Seemingly, firefox and google chrome behave diff in this regard. Chrome doesn't have a multiline mode, although you can do multiline commands (shift+enter). Chrome just returns undefined after the 2 command logs. I was looking at this spec - https://console.spec.whatwg.org/#logger which i got from https://nicolaschevobbe.com/2019/01/17/webconsole-2018-retrospective.html – JoePythonKing Jan 03 '21 at 10:36
  • @JoePythonKing chrome has snippets, but I think that's unrelated to the linked answer JustRaman gave. – evolutionxbox Jan 03 '21 at 11:29
  • This looks like a bug to me. Try reporting it to the FF team. – Bergi Jan 03 '21 at 14:23

0 Answers0