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

149
Views
how to inset text of an array as innerHtml
let arr=[<b>hari</b>,<b>gc</b>]
let newarr=arr.join(" ")
let textnode=document.createTextNode(newarr)
let al = document.getElementById("neww");
$(textnode).insertBefore(al);

expected output: hari gc

what i get as the output:

<b>hari</b> <b>gc</b> 

I tried using parse from npm HTML react parse..but it results in an error

plese help..

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

0

You can write it via dangerouslySetInnerHTML like this

<div dangerouslySetInnerHTML={{ __html: yourHtmlString }} />
about 4 years ago · Juan Pablo Isaza Report

0

let arr = ['<b>hari</b>', '<b>gc</b>']
    let newarr = arr.join(" ")
    let block = document.querySelector(".block");
    block.innerHTML = newarr
<div class="block"></div>

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!