0
Print using arrays and if
Is there a short way to create a code stating that if "schedule" equals "8" for instance, that person's name should be printed. I was doing it but I wondered if there was a shorter way for that. https://code.sololearn.com/ciYqSZ7QBlBN/?ref=app
2 Answers
+ 1
So you can try something like this
https://code.sololearn.com/cqWIWUO4LQ86/?ref=app
the code uses a Array of Object to store all names and schedules
After just looks for each element in array who have a schedule with inserted number to print
+ 1
Thanks a lot, that looks really helpful. Nonetheless, I don't fully understand all of the topics in that program, but they give me a good idea as to what to study next. đ