PrepAway - Latest Free Exam Questions & Answers

How should you complete the relevant code?

DRAG DROP
A company asks you to create a function that displays loan amounts to their customers.
You must create the function by using JavaScript to meet the following requirements:
Display three different loan amounts to each customer.
Display loan amounts in order starting with the greatest amount and ending with the least
amount.
You need to implement the function.
How should you complete the relevant code? (To answer, drag the appropriate command or
commands to the correct location or locations in the answer area. Use only commands that
apply.)

PrepAway - Latest Free Exam Questions & Answers

Answer:

Explanation:

5 Comments on “How should you complete the relevant code?

  1. Aires says:

    I don’t think the answer is correct, the said “Display loan amounts in order starting with the greatest amount and ending with the least amount” this means the first function should have the value 1000; the second function 800; and the third one 400.




    0



    0
  2. Iqbal chaudhary says:

    This is correct answer. I have executed it.
    ShowLoadAmount();
    function ShowLoadAmount(){
    var loanAmount = 400;
    function showSomeLoanAmount(){
    showAnotherLoanAmount();
    function showAnotherLoanAmount(){
    var loanAmount = 1000;
    alert(loanAmount);
    }
    var loanAmount = 800;
    alert(loanAmount);
    }
    showSomeLoanAmount();
    alert(loanAmount);
    }




    0



    0
  3. Would You Agree? says:

    I think there is another answer:

    showLoanAmounts();
    function showLoanAmounts(){
    var loanAmount = 400;
    function showSomeLoanAmount(){
    showAnotherLoanAmount();
    function showAnotherLoanAmount(){
    var loanAmount = 1000;
    alert(loanAmount);
    }
    var loanAmount = 800;
    alert(loanAmount);
    }
    showSomeLoanAmount();
    alert(loanAmount);
    }




    0



    0

Leave a Reply