Split Item Codes

Published by Helen Yu in

You have an array of item codes with the following format: "[letters][digits]"

Create a function that splits these strings into their alphabetic and numeric parts.

Examples

splitCode("TEWA8392") ➞ ["TEWA", "8392"]

splitCode("MMU778") ➞ ["MMU", "778"]

splitCode("SRPE5532") ➞ ["SRPE", "5532"]

Notes

N/A

Watch a quick demo on how Edabit works.