Here are my completed solutions for conditionals skills 1-4. Please evaluate my code and let me know if I utilized the correct code.
Hi @Arthur_Chen!
You’ve done some fantastic work here — well done!
Answer 1 is perfect.
In answer 2, you’ve got a small and subtle bug. You need to change if (machineActive = true)
to if (machineActive === true)
, otherwise it will still return a result, even if the machine is off. Assigning a value to something always returns true, weirdly enough
Same small bug in answer 3.
Answer 4 is perfect.