FreeCodeCamp - Advanced challenge
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
function sym(args) {
var total = [];
var numbers = [];
var filtered = [];
for(var i=0; i<arguments.length; i++) {
total.push(arguments[i]);
}
for(var l=0; l<total.length; l++) {
total[l].forEach(function(num) {
numbers.push(num);
});
}
// for(var m=0; m<number.length; m++) {
// if(filnumber[m])
// }
console.log(numbers.indexOf(10));
console.log(numbers);
}
sym([1, 2, 3], [5, 2, 1, 4]);
</script>
<script id="jsbin-source-javascript" type="text/javascript">function sym(args) {
var total = [];
var numbers = [];
var filtered = [];
for(var i=0; i<arguments.length; i++) {
total.push(arguments[i]);
}
for(var l=0; l<total.length; l++) {
total[l].forEach(function(num) {
numbers.push(num);
});
}
// for(var m=0; m<number.length; m++) {
// if(filnumber[m])
// }
console.log(numbers.indexOf(10));
console.log(numbers);
}
sym([1, 2, 3], [5, 2, 1, 4]);
</script></body>
</html>
function sym(args) {
var total = [];
var numbers = [];
var filtered = [];
for(var i=0; i<arguments.length; i++) {
total.push(arguments[i]);
}
for(var l=0; l<total.length; l++) {
total[l].forEach(function(num) {
numbers.push(num);
});
}
// for(var m=0; m<number.length; m++) {
// if(filnumber[m])
// }
console.log(numbers.indexOf(10));
console.log(numbers);
}
sym([1, 2, 3], [5, 2, 1, 4]);