JavaScript for beginners - Chapter 23 - Arguments Object to a function - part 1

Published: 10 February 2017
on channel: Ankpro Training
184
5

JavaScript Arguments Object :
The javascript arguments object is a local variable available within all functions.
An arguments object includes value of each parameter.
The arguments object is an array like object. You can access its values using index similar to array.
The length property of the arguments object returns the number of arguments passed to the function.
We can pass variable number of arguments to a javascript functions. All the parameters will be stored in the arguments object.
An arguments object is still valid even if function does not include any parameters.
An arguments object can be iterated using for loop.

function ShowMessage(firstName, lastName)
{
alert("Hello " + arguments[0] + " " + arguments[1]);
}

ShowMessage("Steve", "Jobs");

ShowMessage("Bill", "Gates");

ShowMessage(100, 200);

ankpro
ankpro training
Asp.net MVC
C#
C sharp
Bangalore
Rajajinagar
Selenium
Coded UI
Mobile automation testing
Mobile testing
JQuery
JavaScript
.Net
Components of the .Net framework
Hello World


On this page of the site you can watch the video online JavaScript for beginners - Chapter 23 - Arguments Object to a function - part 1 with a duration of hours minute second in good quality, which was uploaded by the user Ankpro Training 10 February 2017, share the link with friends and acquaintances, this video has already been watched 184 times on youtube and it was liked by 5 viewers. Enjoy your viewing!