Better ways to insert variable into string? 4. How does a function work


#1


I'd like to know if there's a better way to insert variables in JavaScript.

In Pyhthon we can do this "%s" % (variable)

I did search on Google and found this util.format() function but it's a nodejs API and I have no idea of what nodejs is or how it works.


Replace this line with your code.


#2

nodeJS is used for building backend of website.

so far i know, you only have one way, which is + to concat string and variable


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.