Ashley P.

asked • 11/19/19

Javascript functions

Write a JavaScript function to calculate difference of square values of two numbers passed as function arguements and to display the absolute value of it in an alert box.


function v(5,3){

var a =5 ;

var b =3;

var r =(a*a)-(b*b);

var s = Math.abs(r);

alert("Absolute value = "+s);


Why this is not working?

1 Expert Answer


Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.