Skip to content

Annie: General refactoring, removing console.logs #46

@juliebarwick

Description

@juliebarwick

console.log(reviewObject)
if (!reviewObject.rating) {
alert("Please select a rating")
} else if (reviewObject.summary.length > 60) {
alert("Review headline must be less than 60 characters")
// } else if (reviewObject.body.length > 1000 || reviewObject.body.length < 50) {
// alert("Review must be between 50 and 1000 characters")
} else if (!reviewObject.recommend) {
alert("Please select a recommendation")
} else if (!reviewObject.name) {
alert("Please fill in your username")
} else if (!reviewObject.email) {
alert("Please fill in your email address")

Just a few things that could be tidied up here - extra whitespace lines, unnecessary console.logs that were used in development.
Finding another way to point out the user input errors instead of using alerts would be a good improvement as well (time permitting!).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions