Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript find all odd between two numbers

function oddNumbers(l, r) {
    let arr = [];
    while (l <= r) {
        arr.push(l);
        l += 1;
    };
    return arr.filter(n => n % 2);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #find #odd #numbers
ADD COMMENT
Topic
Name
7+1 =