Functions in javascript, JAVA Programming

The following set of short questions will focus on getting you familiar with JavaScript functions. All functions and testing should appear in a single XHTML 1.0 Strict page.

All your JavaScript functions must be declared in the document head section and each functions name must be as specified below. To demonstrate the functionality of each method, you must make function calls in the document body. Include a heading (h1... h6) that indicates which function is being tested before each function demonstration. The use of Global Variables is forbidden!

Function: addNumbers
Parameter(s): Array of numbers
Each element in the array must be added and the summation (answer) must be returned.

Function: getCurrentDate
Parameter(s): None
Retrieve the current date in the format similar to: Monday, May 10, 2010 and return it.

Function: arrayToString
Parameter(s): Array of words
All the elements of the array must be concatenated into a single string and returned.

Function: findMaxNumber
Parameter(s): None (Hint: Make use of the arguments array - page 167 in course book)
From the arguments array, find the number element that is the largest and return it.

Function: getDigits
Parameter(s): A String
Scan the string and find all the digits (0-9), concatenate them into a string in the order that they are found and return the string of numbers.

Function: reverseString
Parameter(s): A String
Reverse the entire string (character by character) and return the resulting string.

Posted Date: 3/18/2013 2:48:27 AM | Location : United States







Related Discussions:- Functions in javascript, Assignment Help, Ask Question on Functions in javascript, Get Answer, Expert's Help, Functions in javascript Discussions

Write discussion on Functions in javascript
Your posts are moderated
Related Questions
Alia is appearing for the board exams. In order to qualify for the next class Alia need to get exactly X credits. In current semester Alia has to study N number of subjects, and ev

Explain java flow control ? if else else if while for do while switch case break continue goto is a reserved word.

Add extra Features to exciting Minecraft plugin Project Description: I own a minecraft server and have a minigame plug-in but at the end of the game the map need to regenerat

What are application softwares? List down the names of three application software's. Definition: Application Software are in which software then can interact directory along

Describe Inner Classes in java? An inner class is a class whose body is described inside another class, referred to as the top-level class. For instance: public class Queue {

Spring configuration file is an XML file. This file having the classes information and defines how these classes are configured and introduced to each other.

Question 1 Describe any five buzz words in Java Question 2 Describe exception classes and also explain common exceptions in java Question 3  Describe primitive and

What are the conditions for exiting the while loop?

Journal of how you came to AUB Write a web application using JavaScript, XML and CSS that contains a journal of major events and places on your journey to Bond University. The

How do you decide when to use HashMap and when to use TreeMap? When we want to perform deletion, insertion and locate elements in a Map then HashMap is used. Whereas TreeMa