Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bessie.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
function bessie() {
// return "Bessie says hello."

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Remove comments

return "Bessie says Hello!";

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

nit: avoid hard-coding string and use variable public static final BESSIE_HELLO="Bessie says Hello!"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Suggested change
return "Bessie says Hello!";
return BESSIE_HELLO;

}
2 changes: 2 additions & 0 deletions hello.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<script src="bob.js"></script>
<script src="elisabeth.js"></script>
<script src="robert.js"></script>
<script src="bessie.js"></script>
<title>Hello Team</title>
</head>
<body>
Expand Down Expand Up @@ -31,6 +32,7 @@
updateText(elisabeth(), textContent);
updateText(bob(), textContent);
updateText(robert(), textContent);
updateText(bessie(), textContent);
// Note: we need to add more function here for everyone to say hello.

// append the text content to the document
Expand Down