3 ms·
Pythonic string formatting in Javascript
- igorgue 16y agoWell... Python is a little bit better, e.g.: >>> class Person: ... x = "lol" ... y = "right?" ... >>> "{0.x} {0.y}".format(Person()) 'lol right?' Also this function: http://stackoverflow.com/questions/610406/javascript-printf-string-format/4256130#4256130 http://stackoverflow.com/questions/610406/javascript-printf-... adding it to the String objects would be cool too.