title: Execute function with given parameters
body: <p>I was wondering if someone could help me refine this piece of code, in my eyes it is not a nice function to execute are there ways to reduce this function in lines?</p>
  
  <p>This is my function:</p>
  
  <pre><code>function changeStyling(input, changeSelector, elementCssChange, pixels) {
     if(!reload){
      if(changeSelector === '.exit-intent-wrapper' &amp;&amp; elementCssChange === 'background') {
          this.base64PopupBGImg = null, document.querySelector(changeSelector).style[elementCssChange] = `${input.value}`;
      }
  
      pixels ? 
          document.querySelector(changeSelector).style[elementCssChange] = `${input.value}px` : 
          document.querySelector(changeSelector).style[elementCssChange] = `${input.value}`;
    } else {
      pixels[i] ? document.querySelector(changeSelector[i]).style[elementCssChange[i]] = `${input[i].value}px` : document.querySelector(changeSelector[i]).style[elementCssChange[i]] = input[i].value;
      for (i = 0; i &lt; arguments.length; i++) {
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And this is how i execute it on reload:</p>
  
  <pre><code>changeStyling(
          [
              document.querySelector(".exitIntentWidth"), 
              document.querySelector(".exitIntentHeight"), 
              document.querySelector(".exitIntentRadius"),
              document.querySelector(".exitIntentPaddingAll"),
              document.querySelector(".exitIntentPadding"),
              document.querySelector(".exitIntentPaddingLeft"),
              document.querySelector(".exitIntentPaddingRight"),
  
              document.querySelector(".btnWidth"),
              document.querySelector(".btnHeight"),
              document.querySelector(".btnRadius"),
              document.querySelector(".btnColor"),
              document.querySelector(".btnTextColor")
          ], 
          [
              '.exit-intent-wrapper',
              '.exit-intent-wrapper',
              '.exit-intent-wrapper',
              '.exit-intent-wrapper',
              '.exit-intent-inner',
              '.exit-intent-inner',
              '.exit-intent-inner',
  
              '.button',
              '.button',
              '.button',
              '.button',
              '.button'
          ],
          [
              'width',
              'height',
              'borderRadius',
              'padding',
              'padding',
              'paddingLeft',
              'paddingRight',
  
              'width',
              'height',
              'borderRadius',
              'backgroundColor',
              'color'
          ],
          [ true, true, true, true, true, true, true, true, true, true, false, false ]
      );
  </code></pre>
  
  <p>Does someone know how I can reduce the execute of the function?</p>