You are reading a single comment by @Sara and its replies. Click here to read the full conversation.
  • Hi!

    Link to the code I am recreating:­tps://­lorwheel/app.js&upload&emulator

    I am just playing around for a project in school (uploaded my code in this post) , with 0 programming skills and have som difficulties with my code (wonder why).

    As you can see, you can click on all the different modes (the colors displayed on the wheel), but not in the middle without it being called "undefined". I seemed to have fixed the problem before but after coding some more it showed up again, only this time I couldn't fix it.

    I want it to say "Set mode" if I click on the white circle in the middle and did as I did with the others:

    switch (true) {

    case (Color == standard_green):
    case (Color == standard_red):
    case (Color == standard_pink):
    case (Color == standard_blue):
    **case (Color == standard_white): switchMode("Set mode"); 


    But it won't work.

    My other problem is that I wan't my code to itterate through 20 pictures, but it only itterates through 10.
    I've defined the image variables and put them in a list:
    let blue_images = [
    blue_image_1, blue_image_2, blue_image_3, blue_image_4, blue_image_5,
    blue_image_6, blue_image_7, blue_image_8, blue_image_9, blue_image_10,
    blue_image_11, blue_image_12, blue_image_13, blue_image_14, blue_image_15,
    blue_image_16, blue_image_17, blue_image_18, blue_image_19, blue_image_20

    Anyone who knows what the problem is with the code?

    Thank you! :)

    2 Attachments


Avatar for Sara @Sara started