Show Menu

jQuery Utility Functions: Type Testing Cheat Sheet by

Overview of jQuery's type testing utility functions.
programming     javascript     jquery

Use Cases

Dete­rmine the type of an object
Allow for optional parameters & valida­tion


$.is­Arr­ay(­arr­ay) => returns true if array
$.is­Fun­cti­on(­fun­cti­on) => return true if function
$.is­Emp­tyO­bje­ct(­obj­ect) => return true is simple, empty object
$.is­Pla­inO­bje­ct(­obj­ect) => return true if object was created with {} or 'new' keyword
$.is­Xml­Doc­(doc) => return true if xml document or node within xml document*
$.is­Num­eri­c(n­umb­er) => return true if number
$.is­Win­dow­(wi­ndow) return true if window or frame
$.ty­pe(­obj­ect) => returns type of object as string

type() Function Return Values

Download the jQuery Utility Functions: Type Testing Cheat Sheet

1 Page

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

Like this cheat sheet? Check out our sponsors! is a collection of tools to make your writing better. More readable content means higher conversion rates and better reader engagement. Measure website and document readability, measure keyword density and more!

Click Here To Get Started!



No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Web Programming Cheat Sheet
          jQuery Cheat Sheet