Javascript – Why there's always an empty element at the first index?
Whenever i tried to put something in my todoList there's alwasy an empty element at first indext Why it is happening? const [todoList, setTodoList] = useState([]); const addToList = (inputText) => { if (inputText === "") { alert("List is Empty")…