title: what happen when we pass arguments inside the function itself?
body: <p>Kindly Accept my apologies for being a beginner in JS.
  I stopped studying JS on a point of what is the correct answer of what happen inside a function when passing arguments, let us describe by code snippet.</p>
  
  <pre><code>function myFun(x){
     console.log(arguments);
     console.log(x);
  }
  myFun(1);
  </code></pre>
  
  <p>according to the above example, 
  is the correct action happened is : </p>
  
  <p><strong>Example 1</strong></p>
  
  <pre><code>when passing calling myFun(1) this will do : 
      function myFunction(x){
      var x = 1
      }
  </code></pre>
  
  <p><strong>OR</strong>
  <strong>Example 2</strong></p>
  
  <pre><code> function myFunction(x,y,z){
      x=arguments[0];
      y=arguments[1];
      z=arguments[2];
      }
  </code></pre>
  
  <p>according to the <a href="http://www.ecma-international.org/ecma-262/5.1/#sec-10.6" rel="nofollow noreferrer">main documentation</a>, i didn't find the desired approach, what i found in arguments object creation process  is that:</p>
  
  <blockquote>
    <p>Repeat while indx >= 0,
    Let val be the element of args at 0-origined list position indx.</p>
  </blockquote>
  
  <p>which I couldn't specify this related to the process of assigning the values or not.</p>
  
  <p>So according to above at all , </p>
  
  <p><strong>which solution is the correct?</strong>
  <strong>how arguments assigned to parameters? if we passed value 1 as an argument , in the function scope, 1 will be assigned to x or 1 will be assigned to arguments Object?</strong> </p>