Sign in Sign up
Javascript review for jQuery
Fundamental Functions

Functions are the fundamental unit of action in jQuery. The main entry point of most jQuery applications is a block of code that looks like

$('document').ready(function() {
    //do something;

An understanding of JavaScript functions will help you to get the most out of jQuery.

There are two ways to define a function but we've been mainly showing you this approach:

var myFunction = function() {
    //do something;

We use this method because it is slightly more flexible than the other approach but the differences are not that important.


Write two functions:

  1. sayHello() that returns just "hello"
  2. multiplyThree(x,y,z) which takes three numbers and returns the product of all three of them multiplied together. So multiplyThree(3,5,7) should return 105.
View Preview
Back to Editor

Sign in