Bear Bibeault wrote:Use the debugger or console.log to see what each factor in your conditional expressions equates to individually. Make sure that they are all as you expect.
Also, prefer !== and === in comparisons. That way you get xact comparisons without coersions.
Thanks. Changed code to following and all is good now.