i am getting this strange behaviour from javascript object representation on console and it doesn't make any sense to me
code1:
var list = {
todo: {task: "one"}
}
console.log(list)
list.todo.task = "two"
why would console shows me updated value of task ? strangely if i just log the task, it shows me different value
code2:
var list = {
todo: {task: "one"}
}
console.log(list.todo)
list.todo.task = "two"