editIndex == index
checks if the current task is the one being edited. This helps show the input box and save/cancel buttons only for that task. It's better to use ===
instead of ==
because ===
checks both the value and the type, which makes your code more accurate and avoids bugs.