# Returning a value and creating a table into a container

**URL:** <https://forum.kirupa.com/t/returning-a-value-and-creating-a-table-into-a-container/305723>\
**Category:** web dev\
**Created:** [March 2, 2010, 5:59pm UTC](https://forum.kirupa.com/t/returning-a-value-and-creating-a-table-into-a-container/305723 "2010-03-02T17:59:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fm47](https://avatars.discourse-cdn.com/v4/letter/f/50afbb/32.png) [@fm47](https://forum.kirupa.com/u/fm47)\
**Post date:** [March 2, 2010, 5:59pm UTC](https://forum.kirupa.com/t/returning-a-value-and-creating-a-table-into-a-container/305723/1 "2010-03-02T17:59:58Z")

</div>

So, I was wondering about the return… method(?).

if I have 2 parameters on a function, and use a return method within the function… which parameter does it go to if I return just 1 parameter?

function myFunc(a,b) {  
return(2);  
}

Say, I wanted to change the “a” parameter to 2, while keep “b” whatever it might have become.

Also, can I return the value of “a” by myFunc.a? I understand I can test this on my own, and will as soon as I get the chance, but as for now, if someone could kindly take a moment to answer, that’d be great ^^

Also, I would like to create a table via JS into a \<div id=“container”\>\</div\> location, but how do I go about that? As far as I am capable of doing, it writes over everything on the page, as it is called on \<body onload=“maketable()”\>
