So basically, I tried to use this spaghetti code to get most of the elements in an array:
args[0] + args[1] + args[2] + args[3] + args[4] + args[5]
ls -r /tmp null null null
But that did not work, so I kind of need help. This is in Node (sorry, forgot to mention that)
Would something like this work?
console.log(args[0] + "<br>" + args[1] + "<br>" + args[2] + "<br>" + args[3] + "<br>" + args[4] + "<br>" + args[5]);
Oof, sorry, this is in Node, forgot to mention that.
The code above is javascript.
No, what I meant is the code this is supposed to run is in node, not the browser.
This code should run in node. The output goes to the terminal instead of the web console.
Oof, I did it, and It got all of the elements from the array, and spaced them out.
var array = ["thing 1", "thing 2", "thing 3"];
var length = array.length;
var i = 0;
var combined = ""
while (i < length){
combined = combined + " " + array[i]
i++
}
console.log(combined)