max-mapper / max-mapper/javascript-for-cats

Semicolons

Open
#51 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
794
Forks
139
PR merge metrics
No merged PRs in 30d

Description

```
function yellIt(string) {
string = string.toUpperCase()
return makeMoreExciting(string)
}
```

That code has no semicolons. Well, it usually works, but not always:
```
a = 1 + 2
(3 + 4).toString()
```

Here is another (beautiful) example of that:
```
var a=3,b=3
[a,b]=[a*a,b*b]
console.log([a,b])
```
Another example:
```
x = 1 + 2
-1..toString()
```

Sources:
http://mislav.net/2010/05/semicolons/
http://codegolf.stackexchange.com/a/48438/33160

I would suggest simply adding semicolons at the end of every statement. (Or, you could add a semicolon when they are needed. Though, explaining that would be more work and most likely would cause more screw ups)

P.S. http://www.randomkittengenerator.com/cats/rotator.php

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the JavaScript examples covered by this lesson, starting with the semicolon examples and cited cases. Add semicolons consistently at statement ends, then verify that the examples still demonstrate the intended behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.