letperson={name:'Jack'};letage=person.age??35;// sets the value 0 if age 0, 35 in case of undefined and nullconsole.log(`Age of ${person.name} is ${age}`);
Output, Age of Jack is 35
Also, check if there is a syntax error. You can paste the code as a comment.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Which browser are you using? It should work.
Output, Age of Jack is 35
Also, check if there is a syntax error. You can paste the code as a comment.