From 65118b76d97fa0a93766b7fedeb1d49dc4dad14d Mon Sep 17 00:00:00 2001 From: Anika Tabassum Date: Sat, 6 Sep 2014 15:13:04 -0400 Subject: [PATCH] Update type-function link --- chapters/classes_and_objects/type-function.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapters/classes_and_objects/type-function.md b/chapters/classes_and_objects/type-function.md index 96e8cea..d9355c0 100644 --- a/chapters/classes_and_objects/type-function.md +++ b/chapters/classes_and_objects/type-function.md @@ -30,7 +30,7 @@ Use the following function: ## Discussion -This function was modeled on jQuery's $.type function. (http://api.jquery.com/jQuery.type/) +This function was modeled on jQuery's [$.type function](http://api.jquery.com/jQuery.type/). Note that, as an alternative to type checking, you can often use duck typing and the existential operator together to eliminating the need to examine an object's type, in certain cases. For example, here is exception-free code that pushes an element to an array, if myArray is in fact an array (or array-like, with a push function), and does nothing otherwise.