comparing two values...
Hi, Im trying to compare 2 values that are inside local storage. When i compare the same values it goes to 'checkout' - but when i compare two different values I get an error as follows:
what its supposed to do when it compares two different values is go to a popup "checkout_pin_wrong"
here is the JS i wrote:
------------------------------------------------------------------------------------var a = localStorage.getItem('pin_num')
var b = localStorage.getItem('pin_num_confirm')
if (a == b) {
Appery.navigateTo('checkout', {
transition: 'flip',
reverse: false
});
}
else {
$.mobile.changePage("checkout_pin_wrong", {transition: "pop"});
}
Supposedly theres a syntax error... Where would that be?