File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ This documentation is based on John Resig's website on Advanced JavaScript
1919
- [Functions as Objects](#functions-as-objects)
2020
- [How similar are functions and objects](#how-similar-are-functions-and-objects)
2121
- [Is it possible to cache the return results from a function](#is-it-possible-to-cache-the-return-results-from-a-function)
22-
- [QUIZ: Can you cache the results of this function](#quiz-can-you-cache-the-results-of-this-function)
2322
- [One possible way to cache the results](#one-possible-way-to-cache-the-results)
2423
- [Context](#context)
2524
- [What happens if a function is an object property](#what-happens-if-a-function-is-an-object-property)
@@ -31,51 +30,42 @@ This documentation is based on John Resig's website on Advanced JavaScript
3130
- [Instantiation](#instantiation)
3231
- [What does the new operator do](#what-does-the-new-operator-do)
3332
- [We have a 'this' context that is a Ninja object](#we-have-a-this-context-that-is-a-ninja-object)
34-
- [QUIZ: Add a method that gives a name to the ninja](#quiz-add-a-method-that-gives-a-name-to-the-ninja)
3533
- [Add a new property and method to the object](#add-a-new-property-and-method-to-the-object)
3634
- [What happens when we forget to use the new operator](#what-happens-when-we-forget-to-use-the-new-operator)
3735
- [Cont: What happens when we forget to use the new operator](#cont-what-happens-when-we-forget-to-use-the-new-operator)
3836
- [We need to make sure that the new operator is always used](#we-need-to-make-sure-that-the-new-operator-is-always-used)
39-
- [QUIZ: Is there another, more generic, way of doing this](#quiz-is-there-another-more-generic-way-of-doing-this)
4037
- [A solution using arguments.callee](#a-solution-using-arguments-callee)
4138
- [Flexible Arguments](#flexible-arguments)
4239
- [Using a variable number of arguments to our advantage](#using-a-variable-number-of-arguments-to-our-advantage)
4340
- [How can we find the Min/Max number in an array](#how-can-we-find-the-min-max-number-in-an-array)
4441
- [Another possible solution](#another-possible-solution)
4542
- [Uh oh, what's going wrong here](#uh-oh-whats-going-wrong-here)
46-
- [QUIZ: We must convert array-like objects into actual arrays. Can any built-in methods help](#quiz-we-must-convert-array-like-objects-into-actual-arrays-can-any-built-in-methods-help)
4743
- [We can use built-in methods to our advantage](#we-can-use-built-in-methods-to-our-advantage)
48-
- [QUIZ: Implement a multiplication function (first argument by largest number)](#quiz-implement-a-multiplication-function-first-argument-by-largest-number-)
4944
- [We can use call and apply to build a solution](#we-can-use-call-and-apply-to-build-a-solution)
5045
- [Closures](#closures)
5146
- [But why doesn't this work](#but-why-doesnt-this-work)
5247
- [Closures are frequently used for callbacks](#closures-are-frequently-used-for-callbacks)
5348
- [They're also useful for timers](#theyre-also-useful-for-timers)
5449
- [And they're also frequently used when attaching event listeners](#and-theyre-also-frequently-used-when-attaching-event-listeners)
5550
- [Private properties, using closures](#private-properties-using-closures)
56-
- [QUIZ: What are the values of the variables](#quiz-what-are-the-values-of-the-variables)
5751
- [The last one is quite tricky, we'll revisit it](#the-last-one-is-quite-tricky-well-revisit-it)
5852
- [Temporary Scope](#temporary-scope)
5953
- [Self-executing, temporary, function](#self-executing-temporary-function)
6054
- [Now we can handle closures and looping](#now-we-can-handle-closures-and-looping)
6155
- [The anonymous wrapper functions are also useful for wrapping libraries](#the-anonymous-wrapper-functions-are-also-useful-for-wrapping-libraries)
6256
- [Another way to wrap a library](#another-way-to-wrap-a-library)
63-
- [QUIZ: Fix the broken closures in this loop](#quiz-fix-the-broken-closures-in-this-loop)
6457
- [A quick wrapper function will do the trick](#a-quick-wrapper-function-will-do-the-trick)
6558
- [Function s](#function-s)
6659
- [Adding a d method to a function](#adding-a-d-method-to-a-function)
6760
- [Properties added in the constructor (or later) override d properties](#properties-added-in-the-constructor-or-later-override-d-properties)
6861
- [d properties affect all objects of the same constructor, simultaneously, even if they already exist](#d-properties-affect-all-objects-of-the-same-constructor-simultaneously-even-if-they-already-exist)
69-
- [QUIZ: Make a chainable Ninja method](#quiz-make-a-chainable-ninja-method)
7062
- [The chainable method must return this](#the-chainable-method-must-return-this)
7163
- [Instance Type](#instance-type)
7264
- [Examining the basics of an object](#examining-the-basics-of-an-object)
7365
- [We can still use the constructor to build other instances](#we-can-still-use-the-constructor-to-build-other-instances)
74-
- [QUIZ: Make another instance of a Ninja](#quiz-make-another-instance-of-a-ninja)
7566
- [Use the .constructor property to dig in](#use-the-constructor-property-to-dig-in)
7667
- [Inheritance](#inheritance)
7768
- [The basics of how prototypal inheritance works](#the-basics-of-how-prototypal-inheritance-works)
78-
- [QUIZ: Let's try our hand at inheritance](#quiz-lets-try-our-hand-at-inheritance)
7969
- [The result is rather straight-forward](#the-result-is-rather-straight-forward)
8070
- [Built-in s](#built-in-s)
8171
- [We can also modify built-in object s](#we-can-also-modify-built-in-object-s)
@@ -90,8 +80,16 @@ This documentation is based on John Resig's website on Advanced JavaScript
9080
- [We can use it to implement method overloading](#we-can-use-it-to-implement-method-overloading)
9181
- [How method overloading might work, using the function length property](#how-method-overloading-might-work-using-the-function-length-property)
9282
- [Quizzes](#quizzes)
93-
94-
<!-- TODO: Create a Separate Quiz Category -->
83+
- [QUIZ: Can you cache the results of this function](#quiz-can-you-cache-the-results-of-this-function)
84+
- [QUIZ: Add a method that gives a name to the ninja](#quiz-add-a-method-that-gives-a-name-to-the-ninja)
85+
- [QUIZ: Is there another, more generic, way of doing this](#quiz-is-there-another-more-generic-way-of-doing-this)
86+
- [QUIZ: We must convert array-like objects into actual arrays. Can any built-in methods help](#quiz-we-must-convert-array-like-objects-into-actual-arrays-can-any-built-in-methods-help)
87+
- [QUIZ: Implement a multiplication function (first argument by largest number)](#quiz-implement-a-multiplication-function-first-argument-by-largest-number-)
88+
- [QUIZ: What are the values of the variables](#quiz-what-are-the-values-of-the-variables)
89+
- [QUIZ: Fix the broken closures in this loop](#quiz-fix-the-broken-closures-in-this-loop)
90+
- [QUIZ: Make a chainable Ninja method](#quiz-make-a-chainable-ninja-method)
91+
- [QUIZ: Make another instance of a Ninja](#quiz-make-another-instance-of-a-ninja)
92+
- [QUIZ: Let's try our hand at inheritance](#quiz-lets-try-our-hand-at-inheritance)
9593

9694
### Goal
9795

0 commit comments

Comments
 (0)