+ 2
Could I make a CONVERSATIONAL JS chat bot this way...?
A chat bot using if() statements and switch() statements. So I literally output the botâs response using if() and switch(). Besides things that I can use keywords for like this... Example: user: Tell me a good joke; goodJokes = [âwhat do you ca..â, âblue is greenâ, âwhy did the chic...â]; if UserInput includes(âTellâ âgoodâ + âjokesâ){ pickRandom(goodJokes) } Using if() I can look for keywords and things like that. And switch() for absolute answers. CONTINUED IN ANSWERS... Iâm over the character count
2 Answers
+ 1
My real questuon is...
What would my code look like...? do u think it would be long as a dictionary ... or meh not that long?
Do you have any tips on this to make it simpler or shorter code?
or, umm should I even try this, or does it sound pointless because it wonât work?
â
CONVERSATIONAL chat bot with js.
0
Hmm