<header> <h1>Beep Lexics</h1> </header> <body> <script> const lexx = ["xyz", "qwe"]; let phrase = prompt("Enter a phrase").trim().split(' ') .map(w => lexx.includes(w) ? "BEEP" : w).join(' '); alert(phrase); </script> </body>