Getting the content inside a span based on its class and id
<p>Im trying to use - </p>

<pre><code>console.log('the favorite count:', $('.favorite-count#'+id).text());
</code></pre>

<p>The id variable is correct but when I log it out, it's logging out blank.</p>

<p>This is what the html looks like -</p>

<p><a href="https://i.stack.imgur.com/FwC5c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FwC5c.png" alt="enter image description here"></a></p>

<p>highlighted is the value im trying to get and change in my code </p>