Homework

Completed.

all hail glorious king rishab please give me .91

Code Runner Challenge

Execute the following homework submission below.

View IPYNB Source
%%js

// CODE_RUNNER: Execute the following homework submission below.

let fruits = ["Heart Shaped Herb", "Yami Yami no Mi", "Gomu Gomu no Mi", "Monkey D. Luffy"];

for (let i = 0; i < fruits.length; i++) {
    console.log(fruits[i]);
}

for (let i = 0; i < fruits.length; i++) {
    if (i % 2 === 0) {console.log (fruits[i] + " is technically an odd fruit in the iteration");
    }
}

for (let i = 0; i < fruits.length; i++) {
    if (i === 3) {console.log (fruits[i] + " is not a fruit," + fruits[i] + " is a character!")}
    
    else {console.log (fruits[i] + " is just a fruit :(")}
    
}
Lines: 1 Characters: 0
Output
Click "Run" in code control panel to see output ...