I need some help with this computer science assignment; it concerns javascript?

I need some help with this computer science assignment; it concerns javascript?




The assignment is below:

Page



1.

Make a function which obtains user input and return it

2.

Repeat the above step for 5 times with the function

3.

Make a function which add all the numbers up from a

number n to n+10 (n is a number between 5 to 8).

Obtain n from use input. (Note: the returned value from

prompt() is String.



heres the code I have so far:







function my_add(b,a)

{

return (b+a)

}

var a = prompt("Please type your name","");

var b = "hello ";

alert(my_add(b,a));

var c = "The number after computation was";

var d = my_add(b,a);







var value = null;

while(value != "10")

value = prompt("Please type the number 1 in","");

if(value != "10");

{

value = value + "1"



}

else

if(value == "10");



alert("The computation has been completed");







function computation (a,b)

{

if(a<5 || a>8)

alert("cannot compute");

else

if(a>5 || a<8)

{

a+10

}

}



I need alot of help! fixing this, I dont really know what I'm doing





No Answers Posted Yet.