I'm having this error when on this line when I'm formatting a string using jQuery,
Uncaught TypeError: f.format is not a function
This is the line where the error seems to be appearing (I've got multiple lines using the same method but none of these seem to be working)
var $li = $(f.format(betid, bet.amount, bet.icon, bet.name, bet.amount));
Why is this happening? I've used this before and it worked just fine?
String:
var f = "<div>";
f += "<div class='avatar''>";
f += "<img src='{2}'>";
f += "</div>";
f += "<div>{3}</div>";
var num = bet.amount;
f += "<div class='user-bet ng-binding'>" + num + "</div>";
f += "</div></div>";