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])

Want to kickstart your project?Use the new AI Studio to create your code