title: How to pass unlimited arguments and one or two parameters to a JavaScript function?
body: <p>How can I pass multiple and unlimited <code>arguments</code> and one or two parameters to a function?</p>
  
  <p>Example:</p>
  
  <pre><code>function myFunction(_id, _class, arg1, arg2, arg3, arg4, etc...){
      console.log($(_id).html());
      console.log($(_class).html());
  
      for(var i = 0; i &lt; args.length; i++) {
          alert(args[i]);
      }
  }
  
  myFunction("#myDiv",".mySpan", "Hello World!", "Bonjour le monde!", "Hola mundo!", "Ciao mondo", "Hallo Welt!", "etc");
  </code></pre>