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

224
Views
turn long html into text in a short and efficient way (js)

how is it possible to turn a long, multiple lines html into one string in a short way?

I can do it in the hard way - using the plus sign for each line.. do we have a shorter way?

(the "duplicated" question wont giving me answer here) appreciate the help!

for example -

<h1>The p element</h1>

<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>

the long way:

`<h1>The p element</h1>` +
`<p>This is a paragraph.</p>` +
`<p>This is a paragraph.</p>` +
`<p>This is a paragraph.</p>`
about 4 years ago · Santiago Gelvez
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!