E
equalium
Hello, this sentence is from the Ajax.Request.prototype function in
prototype.js:
this.url += (this.url.match(/\?/) ? '&' : '?') + parameters;
I understand what it does but I don't know how does "/\?/" work. Would
it be the same as "this.url.match('?')" ?
- What is each slash for?
- Is "\?" an escape character?
Can anybody help me?
Carlos from Barcelona.
prototype.js:
this.url += (this.url.match(/\?/) ? '&' : '?') + parameters;
I understand what it does but I don't know how does "/\?/" work. Would
it be the same as "this.url.match('?')" ?
- What is each slash for?
- Is "\?" an escape character?
Can anybody help me?
Carlos from Barcelona.