Find online courses made by experts from around the world.
Take your courses with you and learn anywhere, anytime.
Learn and practice real-world skills and achieve your goals.
What do we mean by that?
Talk to us!
Not for you? No problem.
30 day money back guarantee.
Learn on the go.
Desktop, iOS and Android.
Certificate of completion.
|Section 1: A Different Take on Objects|
You, This Course, and Us!Preview
|JSON can be used as a textual representation of a JS object. You can construct an object using JSON notation.|
|Object constructors are just functions with two specific differences. The use of the magical keyword "this" within the constructor and the use of the magical keyword "new" to create an object from the constructor|
|You can add properties to an object after it's been constructed on the fly! Pretty mind-bending for programmers from other object oriented languages.|
You can also remove properties from objects after they have been constructed. Again not allowed in traditional object oriented languages!
|Object properties defined in constructors can be functions as well! Again because functions are first class citizens.|
Properties of objects can be accessed using the dot "." notation as well as the square brackets "" notation. They are essentially the same.
|A special for loop exists to loop over object properties. Every object supports this thanks to the base Object class!|
|Bad things happen when you call an object constructor without the new keyword.|
|The typeof operator tells you whether a variable is a number, string, object or undefined. It cannot differentiate between different types of objects though.|
|Use the instanceof operator to figure out what constructor was used to create an object. This only recognizes where the object came from, it does not know what changes were made to the object after it was constructed.|
|Properties are public by default, however it's often useful to have private properties. These are not natively supported in JS but we can fake them.|
|Let's plunge into our first example of prototypical inheritance, and understand the prototype keyword.|
|You can use the prototype keyword to override a property of all objects! Its a lot more powerful than simply overriding a property on a single object.|
|Did you know that its possible to override properties even of built-in object types, such as strings? Do so with care!|
|JSON can be used to create virtually anything - strings, numbers, booleans, empty objects, arrays.|
|JSON can be used to create arbitrarily complex objects - see how.|
Loonycorn is us, Janani Ravi, Vitthal Srinivasan, Swetha Kolalapudi and Navdeep Singh. Between the four of us, we have studied at Stanford, IIM Ahmedabad, the IITs and have spent years (decades, actually) working in tech, in the Bay Area, New York, Singapore and Bangalore.
Janani: 7 years at Google (New York, Singapore); Studied at Stanford; also worked at Flipkart and Microsoft
Vitthal: Also Google (Singapore) and studied at Stanford; Flipkart, Credit Suisse and INSEAD too
Swetha: Early Flipkart employee, IIM Ahmedabad and IIT Madras alum
Navdeep: longtime Flipkart employee too, and IIT Guwahati alum
We think we might have hit upon a neat way of teaching complicated tech courses in a funny, practical, engaging way, which is why we are so excited to be here on Udemy!
We hope you will try our offerings, and think you'll like them :-)