View difference between Paste ID: kEQm6kU2 and 9G25z77p
SHOW: | | - or go back to the newest paste.
1
function readA(a) {var punctuation=a.replace(/[.,\/#!$%\^&\?”’@*;:{}=\-_`~()]/g,"");var capital=punctuation.toUpperCase();var makeString=capital.split(" ");return makeString};
2
3
var b=readA(a);
4
5
var greeting=["HI","HEY","HELLO"];
6
var age=["AGE","OLD"];
7
var birthday=["BIRTHDAY","BDAY"];
8
var time=["TIME"];
9
var live=["LIVE","STATE","FROM","LOCATION","LOCATED"];
10
var game=["GAME","GAMES","VIDEO"];
11
12
function testGreeting(b) {return greeting.some(item => b.includes(item))};
13
function testAge(b) {return age.some(item => b.includes(item))};
14
function testBirthday(b) {return birthday.some(item => b.includes(item))};
15
function testTime(b) {return time.some(item => b.includes(item))};
16
function testLive(b) {return live.some(item => b.includes(item))};
17
function testGame(b) {return game.some(item => b.includes(item))};
18
19-
testGame(b)?"Cleetus mainly plays OSRS and League of Legends.":
19+
testGame(b)?"Pinata mainly plays OSRS.":
20-
testTime(b)?"It is currently "+t+" where Cleetus lives.":
20+
testTime(b)?"It is currently "+t+" where Pinata lives.":
21-
testLive(b)?"Cleetus is from Denver, Colorado.":
21+
testLive(b)?"Pinata lives in his moms house.":
22-
testBirthday(b)?"Cleetus’ birthday is July 15th.":
22+
testBirthday(b)?"Pinata’s birthday is a secret."
23-
testAge(b)?"Cleetus is currently 26 years old.":
23+
testAge(b)?"Pinata is currently 26 years old.":
24-
testGreeting(b)?"Hello, I’m a command designed to answer your questions about Cleetus.":
24+
testGreeting(b)?"Hello, I’m a command designed to answer your questions about Pinata.":
25
26-
"”"+a+"” has no recognizable keywords. Please reformat your question or ask Cleetus directly."
26+
"”"+a+"” has no recognizable keywords. Please reformat your question or ask Pinata directly."