How to: add html into an array?

For example have an array of big it is.
var tenant_fields = []; //new Array();
 tenant_fields[0]=["Pudge", "0"];
 tenant_fields[1]=["Phantom Assassin", "1"];
 tenant_fields[2]=["Sniper", "2"];

I need instead of numbers to add html code, is it possible?
June 3rd 19 at 20:25
1 answer
June 3rd 19 at 20:27
Solution
You have it and so the line, feel free to insert.
The problem as I understand novichkam me. There is such code:
<a href data-html="true" data-trigger="hover" data-toggle="popover" data-content="<div class='hero-footnote'>
 <img src='images/hero/sniper.svg' alt='sniper'>
 <div class='hero-footnote__desc'>
the <h3>Sniper</h3>
 <p>ranged</p>
 <span>Carry — Nuker — Mider</span>
</div>
 </div>"><img src="images/hero/sniper.svg" style="width: 26px; height: 15px; margin-top: 0; margin-right: 4px" alt>Sniper</a>

I have used html and double and single. PHPstorm their screens. And all the code we need in quotation marks is also put. How to get around that? - jarvis_Harris commented on June 3rd 19 at 20:30
<a href data-html="true" data-trigger="hover" data-toggle="popover" data-content="<div class='hero-footnote'">
 <img src="images/hero/sniper.svg" alt="sniper">
 <div class="hero-footnote__desc">
the <h3>Sniper</h3>
 <p>ranged</p>
 <span>Carry — Nuker — Mider</span>
</div>
 "><img src="images/hero/sniper.svg" style="width: 26px; height: 15px; margin-top: 0; margin-right: 4px" alt>Sniper</a>


so your code will be valid, forgot the quotation mark in the data-content - jared81 commented on June 3rd 19 at 20:33

Find more questions by tags JavaScriptHTML