Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

215
Views
bucles de función aunque no debería

Con esta función, quiero insertar datos en mi base de datos de Firebase:

 function insertDaten(titel) { var ref = firebase.database().ref(); ref.on("value", function (snapshot) { var json_elemente = snapshot.val().notes; var keys = Object.keys(json_elemente); var count = Math.max.apply(null, keys) + 1; firebase.database().ref("notes/" + count).set({ id: parseInt(count) + 1, text: "", titel: titel, bild: "" }); }); }

pero cada vez que lo ejecuto, parece hacer un bucle y crear tantos conjuntos de datos como sea posible antes de que el programa se apague. He intentado simplemente agregar un retorno; pero eso tampoco parece funcionar.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!