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

184
Views
No puedo entender qué impide el ajuste de línea.

Tengo un script cuando uso la biblioteca typed.js. Estoy tratando de generar 3 líneas + 1 final. El código funciona generando 2 líneas + 1 final. Al intentar solucionarlo, el código se congela sin enviar un error.

Esta versión del código funciona sin errores. Salidas 2 líneas + 1. afuera

 const lineNumber = app.id !== 2 ? ++app.id : (app.id += 2); setTimeout(() => { const typed = new Typed(`#line${lineNumber}`, { strings: text, typeSpeed: speed, onComplete: callback, }); }, timeout); }; $.getJSON(ipgeolocation, (data) => { writeLine(["line1"], 30, () => { if (app.skippedIntro) return; clearCursor(); const usernames = ['user', 'dude']; const ip = data.ip ? data.ip : usernames[Math.floor(Math.random() * usernames.length)]; const country = data.country_name ? data.country_name : 'your country'; writeLine([`line2`], 30, 500, () => { if (app.skippedIntro) return; clearCursor(); writeLine([`start`], 120, 500, () => { timeouts.push( setTimeout(() => { if (app.skippedIntro) return; clearCursor(); setTimeout(() => { skipIntro(); }, 500); }, 1000) ); }); }); }); });

Esta versión del código no funciona. De acuerdo con la idea, debería generar 3 líneas + 1. 1. afuera

 const lineNumber = app.id !== 2 ? ++app.id : (app.id += 2); setTimeout(() => { const typed = new Typed(`#line${lineNumber}`, { strings: text, typeSpeed: speed, onComplete: callback, }); }, timeout); }; $.getJSON(ipgeolocation, (data) => { writeLine(["line1"], 30, () => { if (app.skippedIntro) return; clearCursor(); const usernames = ['user', 'dude']; const ip = data.ip ? data.ip : usernames[Math.floor(Math.random() * usernames.length)]; const country = data.country_name ? data.country_name : 'your country'; writeLine([`line2`], 30, 500, () => { if (app.skippedIntro) return; clearCursor(); writeLine([`line3`], 30, 500, () => { if (app.skippedIntro) return; clearCursor(); writeLine([`start`], 120, 500, () => { timeouts.push( setTimeout(() => { if (app.skippedIntro) return; clearCursor(); setTimeout(() => { skipIntro(); }, 500); }, 1000) ); }); }); }); }); });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Tenemos las bandas principales y cuando llegas a 3, necesitas sumar 2 para aprender la 5ta.

 const lineNumber = app.id !== 3 ? ++app.id : (app.id += 2);
about 4 years ago · Juan Pablo Isaza Report
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!