Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function readA(a) {var punctuation=a.replace(/[.,\/#!$%\^&\?”’@*;:{}=\-_`~()]/g,"");var capital=punctuation.toUpperCase();var makeString=capital.split(" ");return makeString};
- var b=readA(a);
- var greeting=["HI","HEY","HELLO"];
- var age=["AGE","OLD"];
- var birthday=["BIRTHDAY","BDAY"];
- var time=["TIME"];
- var live=["LIVE","STATE","FROM","LOCATION","LOCATED"];
- var game=["GAME","GAMES","VIDEO"];
- function testGreeting(b) {return greeting.some(item => b.includes(item))};
- function testAge(b) {return age.some(item => b.includes(item))};
- function testBirthday(b) {return birthday.some(item => b.includes(item))};
- function testTime(b) {return time.some(item => b.includes(item))};
- function testLive(b) {return live.some(item => b.includes(item))};
- function testGame(b) {return game.some(item => b.includes(item))};
- testGame(b)?"Cleetus mainly plays OSRS and League of Legends.":
- testTime(b)?"It is currently "+t+" where Cleetus lives.":
- testLive(b)?"Cleetus is from Denver, Colorado.":
- testBirthday(b)?"Cleetus’ birthday is July 15th.":
- testAge(b)?"Cleetus is currently 26 years old.":
- testGreeting(b)?"Hello, I’m a command designed to answer your questions about Cleetus.":
- "”"+a+"” has no recognizable keywords. Please reformat your question or ask Cleetus directly."
Add Comment
Please, Sign In to add comment