prompt

.includes() Checking for keywords in prompt()

时间秒杀一切 提交于 2020-07-09 03:30:40
问题 I'm creating a sort of chatbot which will run on imbedded keywords stored in arrays, in this example I have array x being checked in y . This returns true whenever I exactly type Hello in the prompt() . However if I were to say something along the lines of "Oh Hello There." in the prompt, it returns false. How can I check for keywords in an array within a prompt() (in-between sentences) var x = ['Hello', 'Hi', 'Sup']; var y = prompt("Looking for a Hello..."); if (x.includes(y)){ alert("You

Custom PowerShell prompts [closed]

拈花ヽ惹草 提交于 2020-07-04 07:47:06
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I'm looking for different examples of custom Powershell prompt function implementations. If you have a custom implementation of your

Custom PowerShell prompts [closed]

萝らか妹 提交于 2020-07-04 07:46:49
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I'm looking for different examples of custom Powershell prompt function implementations. If you have a custom implementation of your