Please use the "Insert Code Snippet" button in the comment tool bar when you add code examples to your question/comments.
Based on the fact you are calling the JavaScript <Array>.join() function in your example I will assume your $inv variable is an Array.
You can use Harlowe's (for:) macro to loop through the elements contained within an Array, which you can then output to the page like so.
<h2>Inventory</h2>\
{
(for: each _item, ...$inv)[
<br>- _item
]
}
WARNING: Due to how Halowe implements its Passage Transitioning there is a timing issue when displaying block based HTML elements (like your <h2> element), to get overcome this issue you need to use CSS to change how such elements are displayed. Place CSS like the following within your project's Story Stylesheet area.
div, h1, h2 {
display: inline-block;
width: 100%;
}
note: If you wish to use other block based elements than the three I have included in the above CSS then you will need to add them to that list.