If you use the identity operator the types need to be the same for Javascript to treat the two sides as equal:
http://stackoverflow.com/questions/359494/does-it-matter-which-equals-operator-vs-i-use-in-javascript-comparisons

So either use the equality operator (==) or make the constants strings (PREV = '20') which is what comes through the websocket.