- <header>
- <h1>Filter Lexics</h1>
- </header>
- <body>
- <script>
- const lexis = str => {
- const lexx = ["xyz", "qwe"];
- return !lexx.includes(str);
- }
- let phrase = prompt("Enter a phrase").trim().split(' ').filter(w => lexis(w)).join(' ');
- alert(phrase);
- </script>
- </body>
|