Start learning today, and be successful in your academic & professional career. Start Today!

• ## Related Services

 0 answersPost by Ebssa Tesema on July 1, 2015Hei Why do we need the function square (y)? how do we manage to exchange the values between x and y.I see we have var x in the for loop where it is going to increment to 10; i also understand that we havn't given the square (x) function it is proper calculation instead we used function square (y);and we are getting the result!!! ok but what does it mean to pass data? can you please answer this question?? 1 answerLast reply by: Maury HillstromSun Feb 2, 2014 3:45 PMPost by lae loe on January 28, 2014Hello Maurry... I try this code and java script said missing radix parameter..these are the two codes that show mssing radix parameter and the exponent didn't work..original = parseInt(form.original.value);    exponent = parseInt(form.exponent.value);function getExponent(){ var form  = document.getElementById("exponentForm");    var original;    var exponent;        original = parseInt(form.original.value);    exponent = parseInt(form.exponent.value);    form.result.value = numP(original,exponent);    }function  numP(original, exponent){ var result = 1; for(var i = 0; i

### Functions

• There are two main types of Functions: JavaScript Library Functions and Programmer-Defined Functions
• JavaScript Library Functions are “built-in” functions, ready-to-use
• Programmer-Defined Functions need to be defined and called, in either order
• A“return” statement is required if a value is to be sent back to the function call

### Functions

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

• Intro 0:00
• Q & A 0:08
• Two Main Types of Functions 1:11
• JavaScript Library Functions
• Programmer-Defined Functions
• Library Functions 1:55
• JavaScript Library Functions
• Examples
• Programmer-Defined Functions 3:01
• Procedure
• Programmer-Defined Functions 4:05
• Function Definition Syntax
• Example 1: Delayed Function 5:46
• Example 2: Squared Numbers 8:15
• Example 3: Exponents 12:08
• Example 4: One Die 16:13
• Example 5: Area of Circle 22:09
• Example 6: Area of Circle With Exponent 25:53
• Example 7: Temperature Converter 27:21