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

141
Views
¿Cómo hago esta pregunta de javascript sobre el saludo de un estudiante?
var students = ["Brandon", "Daniel"]; var greetStudent = "Hello, ${students[1]}" for (let i = 0; i < students.length; i++) { greetStudent(students[i]); } for (let student of students) { greetStudent(student); }

¿Cómo hago para que se muestre con console.log " Daniel" como es ${students[1]} ?

Soy principiante en javascript. Por favor ayúdame, te lo agradecería!

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

greetStudent tiene que ser una función, no una variable, ya que la está llamando.

 const greetStudent = (student) => { console.log(`Hello, ${student}`) }
about 4 years ago · Juan Pablo Isaza Report

0

Defina greetStudent como una función y use un literal de plantilla en lugar de una cadena normal.

 let students = ["Brandon", "Daniel"]; const greetStudent = student => `Hello, ${student}`; for (let i = 0; i < students.length; i++){ console.log(greetStudent(students[i])); } for (let student of students){ console.log(greetStudent(student)); }

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!