+ 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

5th Apr 2020, 5:58 AM
Ginfio
Ginfio - avatar
2 ответов
+ 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.
5th Apr 2020, 6:01 AM
Ginfio
Ginfio - avatar
0
Hmm
29th May 2022, 2:44 PM
Stesha Quarcoo
Stesha Quarcoo - avatar