Ad
  • Custom User Avatar

    I don't understand how the code template for JS is setup here. I'm more used to seeing prototype style like this. Can anyone shed some light?

    
    function Plugboard(wires){
      //your code here
    }
      Plugboard.prototype.process = function(wire){
        //your code here
    }
    
    plugboard = new Plugboard("AB");
    plugboard.process('A');