Write a JavaScript code to print all the odd members from 15 backwards to 3. Write the code correct
Answers
Answered by
1
I could write but what is members ? Fix it first.
<( ̄︶ ̄)↗
Just kidding
function print(){
var i;
var write = document.getElementsByTagName('h1')[0];
for(i = 3; i <= 15; i++){
if((i % 2) == 0){
continue; //if num is odd, skip it.
}
write.innerHTML += i + '<br/>';
}
}
print(); //invoke print function
Answered by
1
I could write first send the number
Similar questions