My variable called data contains the following information:
var data={
countrycode: "376",
dob: "2017-05-24",
email: "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e5879687968796a58288848c89cb868a88">[email protected]</a>",
firstName: "ggsgsggsg",
gender: "male",
phoneNumbers: "88888888888888888",
surName: "hshshhshs"
}
let countrycode,iso2,number,firstName,surName,dob,gender,email;
countrycode=data.countrycode;
number=data.phoneNumbers;
firstName=data.firstName;
surName=data.surName;
email:data.email;
gender:data.gender;
dob:data.dob;
console.log('email is',email);
console.log('number is ',number);
console.log('gender is',gender);
console.log('surName is',surName);
console.log('dob is',dob);
console.log('firstName is',firstName);
When I try to log these values, I notice that email, gender, and dob return as undefined while the others show the correct values. Why might this be happening?