Does JavaScript support array/list comprehensions like Python?
I'm trying to get an array from each individual integer from the string. In Python, I would do:
string = '1234-5'
forbidden = '-'
print([int(i) for i in str(string) if i not in forbidden])
Does JavaScript have something similar?