The Challenge: Develop a program that requests a series of numbers, separated by spaces. The objective is to generate a new list with only the even numbers from the input.
To achieve this task, convert the input into an array. While many programming languages offer built-in functions for this type of conversion, create your own algorithm without relying on these pre-existing features. Encapsulate the logic in a function named "filterEvenNumbers" which accepts the original array as input and outputs the new array containing only the even numbers.
Some additional points to consider:
//global array
var arr = [];
var arr = prompt("Enter your numbers");
// var eachNumber = arr.split(",");
var res = arr.split("");
console.log(arr);
console.log(res);
if(res = )
// var str = "How are you doing today?";
//push elements into array
// arr.push(prompt("Enter in a bunch of numbers", "")); //push input to array
// console.log(arr);
// https://stackoverflow.com/questions/28252888/javascript-how-to-save-prompt-input-into-array
// var arr = prompt("Enter your numbers").split(",");
// console.log(arr);
// var arr = [];
// for(var i = 0; i < 10; i++)
// arr.push(prompt("Enter a number");
// Convert number into array in Javascript
// https://stackoverflow.com/questions/20730360/convert-number-into-array-in-javascript
// var numbers = "1, 2, 3";
// var eachNumber = numbers.split(",");
// /* now parse them or whatso ever */
// console.log(eachNumber);