Evaluation wanted for test your skills : Conditionals

Here are the links for my attempts

task 1 A Pen by Cleo (codepen.io)
task 2 A Pen by Cleo (codepen.io)
task 3 A Pen by Cleo (codepen.io)
task 4 A Pen by Cleo (codepen.io)

Eagerly waiting for your evaluation and remarks.

Hi @Cleo_Shepsut

Great work on all four tasks. :medal_sports:

Although everything works I want to mention two things:

  • In tasks 3 and 4 you have an assignment in your condition (machineActive = true and machineActive = 'true'). That’s probably not what you wanted. The first condition should just be true. That’s the value we want to compare with our casees. The second condition should just be machineActive. (It’s already a boolean.)
  • In task 4 you should put the password check inside the condition. (Only check pwd when machine is on)

I hope that helps,
Michael

Hello sir, corrections and changes made as you suggestions.

1 Like

Hello sir , for test your skills loop , I am completely stuck dont know what to do next

const myArray = [‘tomatoes’, ‘chick peas’, ‘onions’, ‘rice’, ‘black beans’];

const list = document.createElement('ul');

for(let i = 0 ; i< myArray.length; i++){if(i === myArray.length-1) {para.textContent=}}

// Don't edit the code below here!

const section = document.querySelector('section');

section.appendChild(list); 

Please help me

You don’t need a condition inside the loop.
This is what you need to do for every item of the array in the loop:

Have a look at the links to learn how to use these methods/properties. I hope that helps you get further. Feel free to ask more questions if needed. :slightly_smiling_face:

Michael