Skip to content

Commit 15bd0eb

Browse files
committed
Change arrow function to longhand method
1 parent b16e93f commit 15bd0eb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/app.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ const app = express();
33
const PORT = 3000;
44

55
// Creates a GET endpoint at the root URL that returns a string
6-
// () => {} is the alternative to function() {}; it's called an arrow function!
7-
app.get("/", (request, response) => {
6+
app.get("/", function (request, response) {
87
response.send("Hello, world!");
98
});
109

1110
// Starts the server on port 3000
12-
app.listen(PORT, () => {
11+
app.listen(PORT, function() {
1312
console.log(`Server listening on port ${PORT}!`);
1413
});

0 commit comments

Comments
 (0)