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

156
Visualizações
putting get chrome storage local value to a dict

I need to get a local storage value outside the call, to use it in another function, I see this is an async function and outside log gets called first, but cant rly wrap how it works and why I get the value on the second call, but not it the first call. So the question is how do I get the value outside the call and make First Call work as second call ?

var Credentials = []
chrome.storage.local.get(["Key"], function(result) {
  const o = result.Key.email
  console.log("this is email", result.key.email)
  Credentials.push({"email": result.key.email})
  console.log("Second Call",Credentials[0].email)
});
console.log("First Call",Credentials[0])
about 4 years ago · Juan Pablo Isaza
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