can anyone help me to add the result to be displayed in the new div tag?(FLAMES game)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Flames</title> <link href="https://fonts.googleapis.com/css2?family=Syncopate:wght@700&display=swap" rel="stylesheet"> <script> function alphaOnly(event) { var key = event.keyCode; return ((key >= 65 && key <= 90) || key == 8); }; function flame_func() { var name1 = document.getElementById('name1').value; var name2 = document.getElementById('name2').value; var result=document.getElementsById("result"); if(name1 == "") { alert("Enter your name") } else if (name2 == "") { alert("Enter your crush name") } var first = name1; var sec = name2; for(i=0;i<name1.length;i++) { sec = sec.replace(name1[i],''); } for(i=0;i<name2.length;i++) { first = first.replace(name2[i],""); } var final = first+sec; //Main function begins here var final_length = final.length; //flames totally 6 letters var letters = final_length; if(letters == "3"||letters == "5"||letters == "14"||letters == "16"||letters == "18") { alert("friends"); } else if (letters == "10"||letters == "19") { alert("lovers"); } else if (letters == "8"||letters == "12"||letters == "13"||letters == "17") { alert("affection"); } else if (letters == "6"||letters == "11"||letters == "15") { alert("marriage") } else if (letters == "2"||letters == "4"||letters == "7"||letters == "9"||letters == "20") { alert("enemies"); } else i