Updated Solution to JavaScript Domain Extracting Exercise