i alredy made the chat app is there a way just to add the bot here is the code :
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
i alredy made the chat app is there a way just to add the bot here is the code :
note after you close the tab you will lose your conversation
note the ai is not completed yet so dont judge yet !
chat
<br> var username = window.prompt("what should we call you");</p> <p>document.write("hey "+username +" how are you today ?" );</p> <div class="highlight"><pre class="highlight plaintext"><code></script></h1> </code></pre></div> <p><body style="background-color: aquamarine; background-image:url(Background.max-x-PIC-MCH043354.jpg); " ><br> <input id="textbox" type="text" placeholder="chat with the ai :)" ><button id="button" onclick="ping.play()" >Send</button><br><br> <ul id="messages"></ul><br> <script src="script.js"> var messages = document.getElementById("messages"); var textbox = document.getElementById("textbox"); var button = document.getElementById("button"); button.addEventListener("click", function(){ var newMessage = document.createElement("li"); newMessage.innerHTML = textbox.value; messages.appendChild(newMessage); textbox.value = ""; }); var ping = new Audio(); ping.src = "ping.mp3";