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

253
Views
¿Cómo puedo pasar la variable a la función cuando el texto del script en los cochecitos
 function domHTML(script, contact = {}, user = {}) { console.log(contact.first_name); console.log(user.name); let dom = ` <div class="main py-3 w-100"> <div class="container"> <div class="content"> ${script} </div> </div> </div>`; console.log(dom); //return dom;} let script = `Hey ${contact.first_name}, ${contact.first_name} this is ${user.name} giving you a quick call from the benefits office here in ${contact.state}. I'll have you have the phone here sec but they have me giving you a quick call because of a form you filled out requesting more information about the life insurance programs through the state of ${contact.state}. They have me, the field underwriter, calling to verify the information, I have DOB as ${contact.birthday} is that correct? Perfect, so ${contact.first_name} like I said I'm just the field underwriter they have calling to let you know your request has been processed.

Estamos haciendo todo virtualmente ahora debido a covid. Toma alrededor de 10-15 minutos para obtener la información. Tome un bolígrafo y papel para las notas y eliminará esto para que no reciba más llamadas.

Quiero hacer que todas las variables se reemplacen con argumentos de función

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

0

Puede convertir su secuencia de script en una función que acepte argumentos y pasarla a domHTML , de esa manera la función de secuencia de script puede pasarle las variables de contact y user .

 function domHTML(fn ,contact = {}, user = {}) { let theScript = fn(contact, user) let dom = ` <div class="main py-3 w-100"> <div class="container"> <div class="content"> ${theScript} </div> </div> </div>`; return dom; } function script(contact, user){ return `Hey ${contact.first_name}, ${contact.first_name} this is ${user.name} giving you a quick call from the benefits office here in ${contact.state}. I'll have you have the phone here sec but they have me giving you a quick call because of a form you filled out requesting more information about the life insurance programs through the state of ${contact.state}. They have me, the field underwriter, calling to verify the information, I have DOB as ${contact.birthday} is that correct? Perfect, so ${contact.first_name} like I said I'm just the field underwriter they have calling to let you know your request has been processed.` } const dom = domHTML(script, contact, user) console.log(dom)
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!