标签云

微信群

扫码加入我们

WeChat QR Code

This question already has an answer here:

I have 2 separate javascript files

#1.js
String.prototype.format = ....
String.prototype.capitalize = ....

#2.js

//................
var text = "some text{0}".format(var1)
//................

How do I make string#format and string#capitalize available in the second file?


In what environment? A browser? Command-line? A server?

2018年05月28日31分14秒

This has been asked and answered several times now, notably here, just look at the "Related" list on the right (it would also have been "pushed" at you when you were asking the question).

2018年05月27日31分14秒