Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

214
Visualizações
Is there any way to manually produce an answer in a browser using JavaScript?

So I'm not 100% if the thing I'm asking for is called answer. If you open your browser's console, in any chromium-based browser it should look something like this: enter image description here

And in Firefox it looks something like this: enter image description here

It's the thing that the console writes to if you use something like document.getElementById.

Is there any way to write to said result/answer?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The arrow to the left is the console telling you that some function returned some value.

If you paste this code to the console, and then run it by typing foo() and pressing enter:

function foo() {
   return "bar"
}

It will return the string "Bar", and the icon you mentioned will appear, indicating that some function simply returned a value and did nothing with it.

Edit: As others mentioned, if you use it with console.log("foo"), the arrow will appear with undefined because the function console.log() doesnt return anything, it explicity prints on the browser's console, but doesn't return any value. Any function that doesn't return a value, the console will return back that arrow with undefined.

Edit2: A full reference of what you can do with console is here: W3Schools Console Object

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda