TodoList(Problem)How to remove elements

Created a list which is 3 elements long but how to remove elements.created an event to remove but not working

<link href="" rel="stylesheet">
    <script src=""></script>
    <div id="cont">
    <div id="main">
      <div id="form">
          <input id="input" type="text" name="text"  placeholder="Write a todo" required>
        <div class="but_cont">
        <button type="submit">Add to list</button>
        <div id="list_block">
          <nav class="nav1">
            <ul class="ul1">
          <nav class="nav2">
              <li><i class="clear fas fa-trash-alt"></i></li>
              <li><i class="clear fas fa-trash-alt"></i></li>
              <li><i class="clear fas fa-trash-alt"></i></li>

console.clear()//clear console to avoid continuing console prints.
const BUTTON = document.querySelector('button')//button
const INPUTFIELD = document.querySelector('input[type="text"]')//inputfield
const UL = document.querySelector('.ul1')//ul element
let array = []//array for creating 
function addItem(){
  let item = document.createElement('li')//creating list item
  let value = INPUTFIELD.value//getting input value
  let dynamic = document.createTextNode(value)//creating dynamic value
  item.append(dynamic)//appending it to the dynamic list item
  if(event.keyCode === 13){//check if the key typed is 'Enter key' i.e 13
     if(array.length > 2)return//check if the length does not exceed more than three list items
     UL.append(item)//if the above conditions are passed then append them to the UL element which is the unordered list
     //if(array.length > 3)return

INPUTFIELD = window.addEventListener("keydown",addItem)
//------remove items----//

const deleteLogo = document.querySelectorAll('.clear')
function removeItems(){
  let trash = []
  if(UL === `${INPUTFIELD.value}`){
  for(let i = 0;i<trash.length;i++){
    UL[i].innerHTML = ""
deleteLogo = window.addEventListener('click',removeItems)