Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md && Attempt to make code concise. #2993

Closed
wants to merge 1 commit into from

Conversation

aadil42
Copy link

@aadil42 aadil42 commented May 31, 2024

function dogs(x) {
    if (x) {
      if (z) {
        return y;
      }
    } else {
      return z;
    }
  }

We can shorten it like this so it's easier to read.

  function dogs(x) {
     if(x && z) return y;
     if(!x) return z;
  }

We can shorten it like this so it's easier to read.
    function dogs(x) {
      if (x) {
        if (z) {
          return y;
        }
      } else {
        return z;
      }
    }
/////////////////////////////////////////////////////
function dogs(x) {
   if(x && z) return y;
   if(!x) return z;
}
Copy link
Collaborator

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is both much harder to read, and violates our own style guide in multiple ways.

@ljharb ljharb marked this pull request as draft May 31, 2024 04:35
@ljharb ljharb closed this May 31, 2024
@aadil42
Copy link
Author

aadil42 commented May 31, 2024

Okay cool.

@aadil42 aadil42 deleted the patch-1 branch May 31, 2024 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants