How can I check if one array contains arr in JavaScript? Usually, I would expect a subString method, but there doesn't seem to be one. What is a reasonable way to check for this?
arr=["aaaaaa-2","bbbbbbbb-2","zzzz-3","ffddssaa-1","sssssss-3","areyo-1"]
i trying to remove last two characters from list, i tried with below code but no use of these, can any one suggest me
arr.substring(0, -2)
I need array like
["aaaaaa","bbbbbbbb","zzzz","ffddssaa","sssssss","areyo"]