Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

All comments

  • @aemrobe

    Posted

    Thanks for the explanation. I have done this challenge before and I have used a another method to calculate the age. I wanted to know the concept behind you have written the code specially the if else one

    var years = presentDate.getFullYear() - userDate.getFullYear();
            var months = presentDate.getMonth() - userDate.getMonth();
            var days = presentDate.getDate() - userDate.getDate();
            const daysPreviousMonth = new Date(presentDate.getFullYear(), presentDate.getMonth(), 0).getDate();
            const daysPreviousPreviousMonth = new Date(presentDate.getFullYear(), presentDate.getMonth() - 1, 0).getDate();
    
            if (days < 0) {
                months--;
                days = daysPreviousMonth + days;
            }
            if (days < 0) {
                months--;
                days = daysPreviousPreviousMonth + days;
            }
            if (months < 0) {
                years--;
                months = 12 + months;
            }
            print(days, months, years);
        }
    
    0
  • @aemrobe

    Posted

    nice job, would you mind if you explaining how you calculate the age

    0
  • @aemrobe

    Posted

    @yemiserrach-assefa well done, good work as your first challenge and I have given you some feedback. I hope it will be helpful.

    1, you have to uncomment the .attrubtion class write your name on the place which says "your name here" because it helps to know who is the author.

    2, after u uncomment .attrubution class in your html file. you should use flex-direction of column inside your body element to make .attrubtion class below the .container element

    3, you should remove the width of 100% in the body element because it is 100% of the size of your screen by default.

    4, you should remove paddign left from you img element

    5, you shouldn't repeat the propertie which you already wrote again inside your media querie.the properties which you should write inside your media queries should be the properties which are different from the one which you wrote first. so I comment the properties which are repeated inside your code.

    6, you should remove the align-items propertie inside your img element because the align-items propertie only written inside the parent flex container or on the element which you write the "display: flex;" property.

    7,you should import the font family and use it in the body element which is given in the style-guide.md file.

    8, you should remove the text transform property which is used in the .white class.

    9, you should remove the <br> property and use margin property inside the h1 element.

    10, you should remove the width property, margin property from the img element because it won't make the image responsive instead use the margin property inside it's parent qr element and use the max-width of 100% inside the img element.

    11, you should use the font-size of the 15px inside the body element because all the elements inside the body element will use it so the h1 element won't look bigger.

    12.you should use the max-width inside the .container element to avoid bigger sizes of the .container element.

    13, you should increase the width of .container element inside the media querie to make it look good at ,mobile devices.

    14, use the background color of light gray inside the body element

    15, use the color of Grayish blue inside your paragraph element.

    16, you can decrease the font-size of the h1 element to make a look the same as given inside the design folder.

    17, it is recommended to use px value for border-radius property.

    18, you can increase the padding left and padding right for your paragraph element inside your the media queriy.

    Marked as helpful

    1
  • @aemrobe

    Posted

    thanks but after updating the solution can the solution screenshot changed. do you know how to change it ?

    0