Generation

testsSat, 12 Nov 2022

const removeByIndex = (items, indexToRemove) => { return items.filter((item, index) => index !== indexToRemove) }

import unittest from removeByIndex import removeByIndex class TestRemoveByIndex(unittest.TestCase): def test_removeByIndex(self): self.assertEqual(removeByIndex([1, 2, 3, 4], 2), [1, 2, 4])

Questions about programming?Chat with your personal AI assistant