Last active
June 5, 2023 12:53
-
-
Save a13ks3y/b4b5cff20df66481973c06518fd88a7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let memory = {}; | |
try { memory = JSON.parse(localStorage.getItem('memory')) || {}; } catch (e) { console.error(e); } | |
do { | |
let query = prompt(`Hi I'm an artificial IDIOT, how can I help you?`); | |
if (!memory[query]) { | |
memory[query] = prompt(`I'm suh an IDIOT, I don't know how to respond, please tell me.`); | |
alert(`Thanks, from now on I will respond: "${memory[query]}" each time you asking "${query}"`); | |
} else { | |
alert(memory[query]); | |
} | |
try { localStorage.setItem('memory', JSON.stringify(memory)); } catch (e) { console.error(e); } | |
} while (true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment