Practice makes perfect


Practice makes perfect

no error messages but it is printing only one thing to console,why?

var object1 = new Object();
object1.howRu = "fine";
var object2 = new Object();
object2.whYoNa ="Prashant";
var object3 = new Object();
object3.good = "good";

output is : "good"
the last object why it didn't printed other things to console


The output you are seeing is a built in behavior of the console... To empty the buffer, which contains the last assignment written in the code. 'good'. To get full output you need to include your own console.log() statements.


and so on with the other two.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.