-
Notifications
You must be signed in to change notification settings - Fork 276
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
Add a complete code example for solving an equation in README (#102) #103
Add a complete code example for solving an equation in README (#102) #103
Conversation
const steps = mathsteps.solveEquation('2x + 3x = 35'); | ||
|
||
steps.forEach(step => { | ||
console.log("before change: " + step.oldEquation.print()); // e.g. before change: 2x + 3x = 35 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you put the comment above the line of code so the lines are max 80 characters?
thanks :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh. Now I see why you put the comments above the lines! Sorry!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evykassirer But the earlier example for simplifyExpression
also has comments on the same lin as the code and it leads to 92 characters in line 19!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooo true.. I should follow my own rules more haha.
What do you think? Is it a lot more readable on the same line (so we should make an exception) or is better to put them all on the line above? I could go either way :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh, it's more readable on the same line. But then, later, if we keep doing this, we might end up bringing scroll bars in the code block, and people have to scroll horizontally to see the end of the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, let's keep it the way it is if it doesn't scroll horizontally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, okay! In that case, we gotta keep some count on how much characters the README can take in before it goes for the next line so we don't put that many characters on a single line of code!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it can take 100 characters with ease without bringing in scroll bars. And a few more characters, from what I can see. Not more. And my code has only one line which has 100 characters and that's the max
looks good! just one comment |
Fixes #102