Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

D-6 Create the Zodiac cycle

Write a function that accepts an argument as a birthday date and returns the correct  zodiac sign as a string. 

Create 12 objects that each has three properties. The sign property, which is the string like 'Aries', 'Capricorn', etc. The begin date for this zodiac, and the end date of the zodiac cycle.

Then if the birthday argument is between (smaller than endDate AND bigger than beginDate) console.log the corresponding sign!

Hint: You may want to loop through all the objects to check if the date is between each object's dates.  That means you have to put all the objects inside a place, where you can loop. :-) 

The zodiac cycle

Kostas Diakogiannis
Module by Kostas Diakogiannis, updated more than 1 year ago
No tags specified