hw06_25.html 331 B

123456789101112131415
  1. <header>
  2. <h1>Filter Lexics</h1>
  3. </header>
  4. <body>
  5. <script>
  6. const lexis = str => {
  7. const lexx = ["xyz", "qwe"];
  8. return !lexx.includes(str);
  9. }
  10. let phrase = prompt("Enter a phrase").trim().split(' ').filter(w => lexis(w)).join(' ');
  11. alert(phrase);
  12. </script>
  13. </body>