Ad
  • Custom User Avatar

    still broken

  • Custom User Avatar

    Approved

  • Custom User Avatar
  • Custom User Avatar

    Exercise test cases are now fixed.

  • Custom User Avatar

    description updated, please check if it's clearer.
    thanks!

  • Custom User Avatar

    Please validate emails properly. If you don't use the "+" sign in your email, it doesn't mean that nobody does. Over the world, probably millions do.
    So now that we have established the need to properly validate - the official and authoritative specifications for valid emails is pretty complicated, actually.
    That's where the idea of server-side validation comes from, to avoid loading big libraries on the client for a simple and one time only task such as validation. The email will be transmitted to the server anyway - there is no use of validating an email address if it's not for sending it to a server. So might as well do the important part of the validation on the server.
    You could implement it client side and it has it's advantages. Depending on the case and needs, either approach can be favorable.

  • Custom User Avatar

    done.. thanks!

  • Custom User Avatar

    It is not possible to use the same regex?

    This is your mistake. You don't validate emails using a regex. It's extremely inefficient, and incredibly huge.

    For details on the complete, fully-valid regex, read more here.

    The important thing to realize: you can 100% fully validate that the text entered is a valid email, and you still won't have solved anything useful. A valid email address doesn't prevent typos (gmial.com), and doesn't guarantee that the email address is a legitimate one (dont-send-me-spam@kjdflkjdsfsdklf.net).

    The only way you can safely check an email address is to send it an email and check to see if you get a bounce. This is literally the only meaningful way to validate an email. If you aren't planning on sending a validation email, you might as well just accept /.+@.+/.

  • Custom User Avatar

    Thank you for the help. I have now changed the description to be less confusing.

  • Custom User Avatar

    Because whatever code is sending the function the points already has the points. It just needs the new average. Presumably then it would story the new points and the new average itself.

  • Custom User Avatar

    Yeah... I think it's pretty obvious that it needs to be returned myself (how would the result be teste otherwise?), but I've added a note that the new value should be returned. Thanks for your comment.