I have the following code:
var doneFile=convertToMOSTEM(curFile.file,curFile.color,curFile.importance);
console.log('doneFile:');
console.log(doneFile);
debugger;
filesOS.add(doneFile);
debugger;
convertToMOSTEM
returns a custom object. The console.log
logs the custom object created by convertToMOSTEM
to the console, but at the debugger statement directly after the console.log logs it as a different object. I do not wish to elaborate more about the contents of convertToMOSTEM
, and am instead asking for situations where this can happen. I can say, however, that convertToMOSTEM
creates a custom object with a custom constructor, and then it modifies some of the properties of that custom object, then returns the modified object. The console.log logs the correct version of the object, but the object that I get in the debugger statement is like a clean version of the custom object without the extra modifications applied by the convertToMOSTEM
function. I am not sure if that is very clear, if you have any questions please ask me questions in the comments.