I used some documents to use the JavaScript replace function and didn’t change anything. Errors do not occur. Any idea what I'm doing wrong? The variable is extracted from XML - perhaps it needs to be distinguished as a string or something else?
for (var i = 0, iln = projects.length; i < iln; i++){
var thumb = projects[i].get('thumb');
thumb.replace("200.jpg", "640.jpg");
console.log(thumb)
}
The full meaning of the thumb should look like this:
http://b.vimeocdn.com/ts/160/895/160895498_200.jpg
Is there a better way to find and replace things?
source
share