12. Practice makes perfect

var object1 = {
    age: 24,
var object2 = {
    time: 05.50,
    location: "kolkata"
console.log("this is second" + " " + object3);
var object3 = {
    time: 06.50,
    location: "kolkata"
console.log("This is third" + " " + object3);

Its not passing me .. Console saying

SyntaxError: Unexpected number

Please help with explanation...


You probably get an error because in object2 and object3 you have time property that holds time, storing values without quotes JavaScript will interpret it as a number and that's invalid number format, so you have two choices:

Write your time values like this: 5.50 and 6.50
wrap those values in single or double quotes in that way you can keep zeros at the beginning and your value will be treated as string.


Thanks dude.. It worked.. Just removed the '0's from the beginning.. The values now look like 5.50 and 6.50.. :chocolate_bar: for you..


I'm glad it helped :slightly_smiling:



Hope you solved the problem.. But still am trying to explain your mistakes.

var object1 = {
    carName: "Honda";
    color: "Black";

In this object literal notation you used ';' but thats not allowed in this think literal notation as simple like this:

var object1 = {carName: "Honda" , color: "Black" };

In this case we use ',' as separator ..
Rest everything is fine Have fun mate..


Yeah man, I found the mistake a few minutes later. Thanks though. Cheers!