Code viewer for World: Testing (clone by Dom)

// Cloned by Dom on 21 Dec 2019 from World "Testing" by Michael Ryan 
// Please leave this clone trail here.
 
document.write ( `

<h1> My web page </h1>

<p>
Insert whatever HTML you want in here.
</p>

` );


function loadScripts(callbackFunction)
{
    $.getScript("https://cdnjs.cloudflare.com/ajax/libs/synaptic/1.1.4/synaptic.js", function( data, textStatus, jqxhr ) {
      console.log( data ); // Data returned
      console.log( textStatus ); // Success
      console.log( jqxhr.status ); // 200
      console.log( "Load was performed." );
      
      callbackFunction();
    });
}

function Perceptron(input, hidden, output)
{
	// create the layers
	var inputLayer = new Layer(input);
	var hiddenLayer = new Layer(hidden);
	var outputLayer = new Layer(output);

	// connect the layers
	inputLayer.project(hiddenLayer);
	hiddenLayer.project(outputLayer);

	// set the layers
	this.set({
		input: inputLayer,
		hidden: [hiddenLayer],
		output: outputLayer
	});
}


function main()
{
    console.log("We have imported our external scripts, now we can use them");
        
    
    var Neuron = synaptic.Neuron,
      Layer = synaptic.Layer,
      Network = synaptic.Network,
      Trainer = synaptic.Trainer,
      Architect = synaptic.Architect;
    
    
    function Perceptron(input, hidden, hidden2, output)
    {
      // create the layers
      var inputLayer = new Layer(input);
      var hiddenLayer = new Layer(hidden);
      var hidden2Layer = new Layer(hidden2);
      var outputLayer = new Layer(output);
    
      // connect the layers
      inputLayer.project(hiddenLayer, Layer.connectionType.ALL_TO_ALL);
      hiddenLayer.project(hidden2Layer, Layer.connectionType.ALL_TO_ALL);
      hidden2Layer.project(outputLayer, Layer.connectionType.ALL_TO_ALL);
    
      // set the layers
      this.set({
        input: inputLayer,
        hidden: [hiddenLayer, hidden2Layer],
        output: outputLayer
      });
    }
    
    
    
    // extend the prototype chain
    Perceptron.prototype = new Network();
    Perceptron.prototype.constructor = Perceptron;
    
    console.log("Didn't crash");
}

loadScripts(main);