Day 2: Objects
-
-
PRASHANTB1984 9 years ago See this isn't a usual challenge - it is also a tutorial. So, we handled the part where the string is split. Reading code is also a part of the learning. For someone completely new to programming this is quite essential.
-
jeancochrane 9 years ago You're definitely right that learning to read through code is essential, Prashant. At the same time, a hint telling us to read the code would have helped keep the focus on the lesson, rather than on aimless debugging – I agree with Paul's comment below, in that the previous challenges had trained us to ignore the code beneath our active functions. It was a little bit confusing, although not the end of the world. Anyway, thanks for helping me solve this one!
-
ibsavage 9 years ago IMHO, it would have been a better introduction of objects if the instructions were to print out myObject's properties individually.
-
-
Neurovibes 9 years ago Nowhere in the tutorial does it indicate the idea of creating a function that has no name... so in the part where it says "process.std.in(end'', function() {.. etc" ------------------------------------------------------------------------You create a variable called var myObject = new Object
So this "new Object" is it the default referral to the no-named function listed at the first line, i.e. "..., function () {" ? does that mean "Object" is a reserved keyword? -
Jancl0 9 years ago reading and understanding someone elses code is important, but the task suggests that we had to create the object ourselves
-
gitblame 9 years ago You should have given an array parameter to
printObjectProperty
function instead of anObject
. You guys could have added an extra problem on Scope (or DOM or RegExp) instead of a problem on code reading practice. I don't think having code reading exericses in a 7-day contest make much sense.
-
-
If the point was to learn objects why are we only being asked to console.log() something that is already set? You first say you are giving a single line that had to be put in an object. I though I had to split the string and save each column into the object. Instructions are not clear at all.
Add Reply Preview cancel