Closed srhoulam closed 7 years ago
Generally in favor of introducing new Object()
before {}
. Interested in other's thoughts.
This would move us toward no using object literals everywhere in the initial project, and should get students thinking about the encapsulation of data and behavior sooner.
So, do we want to avoid the shorthand of "object literals" for pedagogy?
This might help with the $.ajax
lessons.
Maybe it's okay to use var foo = {};
but don't initialize properties during the first week?
@jrhorn424 should this be closed? I think the material is well rounded for the objectives but welcome your thoughts.
@jrhorn424 It seems to me that a discussion in progress was ended when this issue was closed. Since the issue doesn't include a conclusion, I an reopening.
@berziiii Please include me in discussions of materials. Thanks.
Having seen all sorts of confusion with object literal syntax, I was wondering if it would sink in more easily with many students if we introduce objects using the
Object
constructor. I think this example will illustrate what I mean:It might be easier to get the idea of a JS object first, then learn the literal syntax afterward.