Horje
how to return argument in javascript Code Example
how to return argument in javascript
function arrgu() {
  var sum = 0;
  for (var i in arguments) {
    sum = sum + arguments[i];
  }
  document.write(sum);
}
arrgu(10, 20, 30, 40);
arrgu(20, 40, 60); 
>100
>120
how to return argument in javascript
function func1(a, b, c) {
  console.log(arguments[0]);
  // expected output: 1

  console.log(arguments[1]);
  // expected output: 2

  console.log(arguments[2]);
  // expected output: 3
}

func1(1, 2, 3);
> 1
> 2
> 3




Javascript

Related
find duplicate values in array object javascript Code Example find duplicate values in array object javascript Code Example
js try..catch works synchronously. Code Example js try..catch works synchronously. Code Example
direction of scroll on page Code Example direction of scroll on page Code Example
self or this javascript Code Example self or this javascript Code Example
angular append to FormControl errors Code Example angular append to FormControl errors Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7