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.)

Explanation:
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
You are wrong. It is actually correct since the first alert called is in the showAnotherLoanAmount() function where the var loanAmount is 1000.
0
0
I am agree with Raaph. Also here is a jsfiddle: https://jsfiddle.net/thx1tpvc/
0
0
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
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