List guests

In this exercise your task is to list guests in a tabular format from the array you created in the previous exercise Greet the guests

List guests table

Use the table below to list guests

Guest Name Gender
1 John Man
2 Mary Woman
3 Zehen Boy
Jia 3 Girl

List guests hints

  • Make use of a for loop to list guests
  • Optional but this can win you a bounty if you can detect the gender inside the loop and show “Mr.”, “Mrs.”,”Master” and “Miss similar to previous exercise
  • Make use of if else condition to check the gender

Write the code in your favorite programming language.

List guests solutions

  • Solution of this exercise in PHP (coming soon)
  • Solution of this exercise in Javascript (coming soon)

List guests helpful links