|
|
|
|
|
by JadeNB
1722 days ago
|
|
I know we're not golfing, but it pains me to see that repetition in the middle. Mightn't we write if (!validateURL(url)) {
url = "http://" + url;
if (!validateURL(url)) {
url = null;
}
}
return url;
to snip a small probability of a bug? |
|