Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
 
PREVIOUS NEXT
Tagged: #return #argument #javascript
ADD COMMENT
Topic
Name
2+4 =