I am looking to remove any value after ':->' in JavaScript For example if 'Packet:->3', I would like to store "Packet:->" in the variable so I can use it before the if statement seen below. Pretty much I am looking to remove any digits after '>'
I was trying the below, but did not have much luck.
NTEremoved = NTE.indexOf(':->');
What would be the best way of doing this?
if(NTE == 'Packet:->' || NTE == 'Serving:->' || NTE == 'Can/Carton/Bottle:->'){
}