> You: How do I combine arrays?
You can use the concat() method.
> You: How?
JS:var firstArray = [1, 2, 3]; var secondArray = firstArray.concat(4);
> You: How do you make an alert appear after 10 seconds?
JS:var timer = setInterval(function(){ alert("Hello, world!"); }, 10);
> You: What is the reduce function used for?
The reduce function is used to reduce an array of data. It takes two arguments: the first is the initial value, and the second is the reducer function.
> You: Find the median of an array.
var median = arr.reduce(function(a, b) { return a + b / 2; }, 0);