Objects for function arguments

<script type="text/javascript">

argumentObject = {arg1: "Argument One", arg2: "Argument Two", arg3: "Argument Three", arg4: "Argument Four"};

function argumentTest(objArgs){
alert(objArgs.arg1 + 'n' + objArgs.arg2 + 'n' + objArgs.arg3 + 'n' + objArgs.arg4);
}

argumentTest(argumentObject);

</script>

0 Comments

You must be logged in to post a comment.