Javascript - Two parameters and return object
<p>So I have been started kinda basic with JavaScript and trying to learn to programming in JavaScript at this point. I have been studying Java before but I can't really get this on my mind. How to make it to work. Been doing some really weird stuff but no luck haha.</p>

<p>Anways</p>

<p>Im stuck at this sort of:</p>

<pre><code>function item(big, low) {
}    
var items = item(5, 10);
console.log(items.big); 
console.log(items.low);
</code></pre>

<p>so what i'm trying to do is like what you see. I want to print it just for each objects in the console.log. But can't get it to work. I tried to do a <code>return big; return low;</code> but no luck. I would more appreciate what I should think rather than have the code written. What should I think at this point?</p>

<p>EDIT:</p>

<pre><code>function Triangle(big, low) {
    return { 
        big: big, low: low
        }
}    
var items = item(5, 10);

console.log(items.height);
console.log(items.width);

console.log(items.area());
</code></pre>

<p>so now I want to use a method and to a math function with area() "height * width" but when I did this: </p>

<pre><code>function Triangle(big, low) {
        return { 
            big: big, low: low
            }
    }  
function Area(big, low) {
}  
    var items = item(5, 10);

    console.log(items.height);
    console.log(items.width);

    console.log(items.area());
</code></pre>

<p>it immediately told me that area() is not a function. What did I go wrong? </p>