function getEven(limit = 100, countLimit = true) {
if (countLimit) {
for (let i = 0; i <= limit; i++) {
if ((i % 2) === 0) {
console.log(`Even: ${i}`)
}
}
return
}
for (let i = 0; i < limit; i++) {
if ((i % 2) === 0) {
console.log(`Even: ${i}`)
}
}
}
function getUneven(limit = 100, countLimit = true) {
if (countLimit) {
for (let i = 0; i <= limit; i++) {
if ((i % 2) !== 0) {
console.log(`Uneven: ${i}`)
}
}
return
}
for (let i = 0; i < limit; i++) {
if ((i % 2) !== 0) {
console.log(`Uneven: ${i}`)
}
}
}