Learn your way! Get started

JavaScript, Part 3 of 6: Functions

with expert Don Kiely


Watch trailer


Course at a glance

Included in these subscriptions:

  • Dev & IT Pro Video
  • Dev & IT Pro Power Pack

Release date 6/26/2012
Level Beginner
Runtime 1h 30m
Closed captioning Included
Transcript Included
eBooks / courseware Included
Hands-on labs Included
Sample code Included
Exams Included


Enterprise Solutions

Need reporting, custom learning tracks, or SCORM? Learn More



Course description

JavaScript is the programming language of the World Wide Web, the code that makes a Web page come alive. This focused course will cover: how to define a function, Nesting and Invocation, Parameters, Values, and Closures of Functions.

Prerequisites

This course assumes that you have at least some programming experience in one or more modern programming languages. JavaScript will be particularly easy for you to learn if you have experience with any C-style languages—including Java, C#, C++, or Visual Basic .NET would be helpful—but this is not required. The focus here is not on programming concepts but on the structure, syntax, and use of the JavaScript language.

Learning Paths

This course will help you prepare for the following certifications and exams:
MCSD: SharePoint Applications
MCSD: Web Applications
70-480: Programming in HTML5 with JavaScript and CSS3

This course is part of the following LearnNowOnline SuccessPaths™:
Web Development Fundamentals

Meet the expert

Don Kiely is a featured instructor on many of our SQL Server and Visual Studio courses. He is a nationally recognized author, instructor, and consultant specializing in Microsoft technologies. Don has many years of teaching experience, is the author or co-author of several programming books, and has spoken at many industry conferences and user groups. In addition, Don is a consultant for a variety of companies that develop distributed applications for public and private organizations.

Course outline



Functions

Defining Functions (18:49)
  • Introduction (00:43)
  • Introduction to Functions (02:12)
  • Defining Functions (02:35)
  • Function Definition Syntax (01:12)
  • Demo: Defining Function (02:36)
  • Demo: Associative Array (03:02)
  • Demo: Expression (01:52)
  • Demo: Pass a Function (03:46)
  • Summary (00:47)
Nesting and Invoking Functions (31:31)
  • Introduction (00:26)
  • Nesting Function Definitions (00:50)
  • Demo: Nested Functions (03:19)
  • Demo: Function Declaration (00:58)
  • Function Invocations (00:46)
  • Function Invocation Expression (00:23)
  • Demo: Function Invocations (01:53)
  • Demo: Invocation Expression (01:53)
  • Demo: Invocation Context (01:03)
  • Method Invocation Expression (00:25)
  • Demo: Method Invocation (03:22)
  • Demo: The This Keyword (04:22)
  • Demo: Solution (02:03)
  • Constructor Invocation (02:07)
  • Indirect Invoctaion (00:47)
  • Syntax for call and apply (01:31)
  • Demo: call and apply (02:54)
  • Demo: call & apply of Object (02:05)
  • Summary (00:16)

Parameters

Function Parameters (14:40)
  • Introduction (00:57)
  • Optional Parameters (00:26)
  • Demo: Optional Parameters (04:31)
  • Demo: One Limitation (01:22)
  • Variable Number of Arguments (01:32)
  • Demo: Number of Arguments (02:36)
  • Demo: Enforcer Function (02:42)
  • Summary (00:30)
Function Values and Closure (25:50)
  • Introduction (00:52)
  • Demo: Object Values (03:23)
  • Demo: Function Object (00:38)
  • Demo: Methods of an Object (01:49)
  • Demo: Convert Function (01:14)
  • Demo: Functions Object Values (04:30)
  • Closures (01:21)
  • Demo: Closures (01:23)
  • Demo: Create Function (02:42)
  • Demo: Message Variable (01:12)
  • More on Closures (01:14)
  • Scope Chains (01:43)
  • Demo: Complex Closures (03:07)
  • Summary (00:33)