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

267
Views
¿Puedes resaltar dónde me he equivocado?

He estado trabajando en esto durante más de 12 horas.

Realmente disfruto codificando pero soy muy malo en eso.

¿Podría resaltar en rojo dónde me equivoqué en este código?

 (function (window) { var names = {"Yaakov", "John", "Jen", "Jason", "Paul", "Frank", "Larry", "Paula", "Laura", "Jim"}; for (let i = 0; i < names.length; i++) { if (firstLetter === 'j') || 'J'{ byeSpeaker.speak(names[i]); } else { helloSpeaker.speak(names[i]); } } })(window); (function (window) { var speakWord = "Hello"; var helloSpeaker = speakWord; helloSpeaker.speak(name) = fuction () (speakWord + " " + name); window.helloSpeaker = helloSpeaker; console.log(window);}) (function (window) { var speakWord = "Good Bye"; var byeSpeaker = speakWord; byeSpeaker.speak(name) = function () { (speakWord + " " + name);} window.byeSpeaker = byeSpeaker; console.log(window);})
 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Module 4 Solution Starter</title> <script src="SpeakHello.js"></script> <script src="SpeakGoodBye.js"></script> <script src="script.js"></script> </head> <body> <h1>Module 4 Solution Starter</h1> </body> </html>

Se supone que debe repetirse para hola nombre pero adiós para nombres que comienzan con J.

Si puedes darme más comentarios te lo agradecería.

Gracias por adelantado.

natasha

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

Tu primera declaración if es mala. Debería ser así:

 if (firstLetter === 'j' || firstLetter === 'J') {
about 4 years ago · Santiago Gelvez 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!