Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'wpdocs_custom_excerpt_length' not found or invalid function name in /home/myonysqo/myonlinehomeworkhelper.com/wp-includes/class-wp-hook.php on line 287

SCRIPTING LANGUAGE PROGRAMMING

josh
July 16, 2016 0 Comment

Paper , Order, or Assignment Requirements

EBI 102 – SCRIPTING LANGUAGE PROGRAMMING

ASSIGNMENT 2 – JavaScript Function

The purpose of this assignment is to gain practice working with JavaScript functions.

 

  1. Create a new external javascript file called myfunctions.js in Notepad++.
  2. In myfunctions.js write the following JavaScript function called printH1() to output a text value in a <h1> element.

function printH1( text ) {

document.write(“<h1>” + text + “</h1>”);

}

  1. In myfunctions.js write another JavaScript function called printParagraph() to output a text value in a <p> element. The function should take one parameter named text.
  2. In myfunctions.js write a JavaScript function named subtract() that subtracts two numbers. The function should have two parameters named x and y, and should return the value of variable named result that is equal to x – y.
  3. In myfunctions.js write a JavaScript function named CalcVol() to calculate the volume of a rectangular solid. The function should have three parameters named x, y and z, and should return the value of variable named Vol that is equal to x * y * z.
  4. Create a new .html file called test.html
  5. In the head section of test.html, insert a script element that accesses the code in the external

myfunctions.js file.

  1. Anywhere in the body of test.html, create a script element that contains the following:
  2. Declare a variable called TotalVolume
  3. Set TotalVolume to the result of the CalcVol() function with the parameters x = 20, y = 10, z = 3.
  4. Use document.write to output the value of the TotalVolume variable
  5. Use document.write to output the result of the subtract() function with x = 50 and y = 35.
  6. Call the printParagraph() function with the parameter A paragraph printed with JavaScript
Facebook
Twitter
Google+
  • 100% Original Essays Guaranteed
  • 8 Hrs Delivery Available
  • Original and creative work
  • Timely delivery guaranteed
  • 100% confidentiality guarantee
  • Variety of disciplines, topics, and deadlines
  • Discounts offered on every custom-ordered paper
  • Original papers written from scratch;
  • 100% confidential;
  • 100% plagiarism-free;
  • Fast turn-around time;
  • Direct communication with the writer;
  • Instant email delivery;
  • Free plagiarism reports;
  • 24/7 customer support team.
  • Choose your font
  • 12 point font size
  • Double-sized
  • Over 275 words/page
  • Text aligned left
  • One inch margin

We Accept

myonlinehomeworkhelper

you have a money back guarantee if you are not satisfied with our services