Please format your code for better readability.


if(pCode[orderNum] == "M3487")


use equals() method instead of == operator for comparing strings like this..