Evaluate the function

Assignment Help Programming Languages
Reference no: EM13935520

Can you please see below and review attachment. (adding parameters to functions & using function parameters)

You made some modifications to your program, but you did not change the function to accept a parameter. You can either modify the function in your program to accept a parameter, or you can use the function I demonstrate below in your program by adding it to your source code file.

To demonstrate I'm going to create a function that meets those requirements described below.

I'm going to name the function display_alert, because that is what the function does.

I'm going to name the parameter, message, because that's what the data contains.

The function is defined as follows:

function display_alert(message){
window.alert(message);
}

It looks very similar to the function you defined below, except for the fact that it gets the data to be displayed in the alert message, from the input parameter.
It uses the parameter variable as an argument to pass to the window.alert() function.

Your program should call this function 13 times.

Each time the function is called, the parameter variable will have a different value.

Two examples of calling the above function with an argument:

var mess1 = "Ten";
display_alert("Ten"); // call the function with an string literal argument
display_alert(mess1); // call the function with a variable argument
// A variable must be declared before(above) using it.

In both examples the value passed to the function is the string "Ten".

Notice that the name of the variable used in the argument does not have to be the same as the name of the parameter variable in the function definition.

Attachment:- Assignment2.zip

Reference no: EM13935520

Questions Cloud

Strategic human resource management practices : Engaging and motivating employees is at the centre of Strategic Human Resource Management (SHRM) practices. It is therefore important to identify the organisational practices that can be used to foster the cognitive, emotional and behavioural qual..
Calculate the expected value of projects net present value : Calculate the expected value of the project's net present value (NPV) and determine the probability that the project will have a negative NPV.
Explain code of dna : Briefly describe the debate between the theory of spontaneous generation and the theory of biogenesis. Explain how Louis Pasteur's experiment with the S-neck flasks in the 1800s resolved this debate. Include a detailed description of Pasteur's exp..
How country risk affects npv : How country risk affects NPV. Explain how the capital budgeting analysis in the previous question would need to be adjusted if there were three possible outcomes for the dollar along with the possible outcomes.
Evaluate the function : Can you please see below and review attachment. (adding parameters to functions & using function parameters)
Explain why the jc penney stores in mexico : Explain why the JC Penney stores in Mexico and in other foreign markets are subject to financial risk (a subset of country risk).
How well integrated are hrm processes : How well integrated are HRM processes with the organisation's strategic business directions? Specify the areas where the linkages do/do not occur, how one link might support or constrain another, and the implications of these relationships.
How is surveillance of the tissues carried out : Contrast active and passive immunity in terms of how each is acquired, how long it lasts, whether memory is triggered, how soon it becomes effective, and what immune cells and substances are involved.
Benefits and purpose for an organizational vision statement : Describe the core values of the organization. Why are these specific values important to the organization? Describe the benefits and purpose for an organizational vision statement. Develop a vision statement for this organization. When developing a ..

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd