I have a test that provides 4 values:
fPortTotal
= a number with how many ports in a firewall test.
fProtocol
= an array with what protocol the port is (ex. UDP, TCP)
fPorts
= an array with what port number
fStatus
= an array with open or closed depending on the port
in all the arrays [0] is the first port, [1] is the 2nd, and so on.
I want to use the .map method to display each port's information in a <p>
. The issue is I'm having a large amount of difficulty understanding the .map method and how to use it. I beleave the "skeleton" of the function should look like this:
function populateFw(fPorts, fStatus, fPortTotal, fProtocol) {
var output = document.getElementById('firewallRes');
var text = document.createElement ('p');
text.id = 'firewallEndResults';
text.innerHTML = arrayOfArrays.map;
}
any help would be appreciated.
You can try something like this: