I have a very elementary query on how the object is being handled by console.log in Javascript. Lets assume there is an object called
let details = {name: 'tom', lname: 'cruise'};
console.log('DETAILS OBJECT IS:-'+details) // Will print object Object
console.log('DETAILS OBJECT IS:-',details) // Will print {name: 'tom', lname: 'cruise'}.
Why the first console.log statement prints the object Object whereas the second statement prints the actual value of an Object?