I am completely new to JS, and having trouble figuring out how to validate that the input via prompt CONTAINS three or more words, seperated by spaces, only alphabetical characters.
This is what I have:
var p = prompt("Enter a phrase:", "");
var phr = p.search(/^[^0-9][2,3]$/);
if(phr != 0)
{
alert("invalid");return
}
else{document.write("phr");