System.print and Diagnostics.log are your friend
Add a widget on your page with ProntoScript name _PS_DEBUG_ (see the dev guide)
System.setDebugMask(9);
for (var i = 0; i < status.length; i++) {
System.print('i:' + i + '=' + status.charCodeAt[i]);
}
What you will see is the the serial match also returns the carriage return at the end of the string (\r).
So status really is 'MUOFF\r' and not 'MUOFF'
That'ts why === does not work and your status.indexOf('MUOFF') > -1 does work.
:-)
Here's what I'd recommend. Download NodeJS as it is a wonderful playground for JavaScript development. It will really help you learn the JavaScript language and the APIs. Also note that the Mozilla website also lets you try out many things directly from a Web Browser.
[Link: developer.mozilla.org]