I have a problem with this piece of code:
var Etudiants = {
"N13213316" : {
"name" : "Touati Mohammed",
"birthDate" : "05 June 2001",
"age" : (Math.round((new Date().getTime() - new Date(this.Etudiants.N13213316[birthDate]).getTime()) / 1000 / 60 / 60 / 24 / 365.25)),
"isStudent" : true,
"departement" : {
"2021" : "USMBA ENCG Fes",
"2021" : "USMBA FLDM Fes"
}
}
}
when i save it i get the following error code :
Uncaught ReferenceError: birthDate is not defined
So basically i'm training to get the value "05 June 2001" to pass it as an argument to the Date function, but i can't do so, however i can access the value from the browser console, where i did make the mistake exactly and thanks in advance.