ASK

Question was successfully created.
HTML COMPUTER PROGRAMMING COMPUTER SCIENCE PROGRAMMING JAVASCRIPT
You asked • 2s
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.

<script>

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 answer

Is var = to variable? If so just fill it in with the letter, just like if you were to find out a algerbraic expression example: 4(A+B)=C

A=3
B= 7
C= 40

You would just fill in the blanks and write it out. When you talk about absoulte value, it is how far a numble is from 0 example: 21= the absoulte value of |21| also equal to |-21| they are both the same distance from 0. Does this give you an idea on how to solve it?
Similar Questions
  1. Distinguish between programming and computational thinking.(1 point)Responses Programming tells a computer what to accomplish,
    1. answers icon 1 answer
  2. Distinguish between programming and computational thinking.(1 point)Responses Programming tells a computer what to accomplish,
    1. answers icon 1 answer
  3. QuestionWhich of the following correctly describes sequential-driven programming?(1 point) Responses Sequential-driven
    1. answers icon 1 answer
    1. answers icon 1 answer
more similar questions