Imagine this scenario - when I type the following command:
open google.com
I need JavaScript to detect "open google.com" and prompt me with an alert. The challenge is figuring out how to generate an alert for just "google.com" without including "open".
var varopen = "open";
if (result.match(varopen)) {
alert(result);
}
My goal here is to only display the value of "result" and not include "varopen".
Essentially, I'm looking for a way to make alert(result - varopen) function correctly, even though my knowledge of JavaScript is limited.