Skip to content

Instantly share code, notes, and snippets.

@haru01
Last active March 2, 2019 13:54
Show Gist options
  • Select an option

  • Save haru01/0fb068937588c0a79d92f39768a61fbb to your computer and use it in GitHub Desktop.

Select an option

Save haru01/0fb068937588c0a79d92f39768a61fbb to your computer and use it in GitHub Desktop.
@@ -4,10 +4,12 @@ function generateReadedReport(readedList, recommendList) {
report += '-----\n';
+ for (let readedBook of readedList.books) {
+ totalPoint += point(readedBook);
+ }
+
for (let readedBook of readedList.books) {
if (readedBook.times >= 1) {
report += ` - ${readedBook.name}: ${point(readedBook)} point\n`;
}
-
- totalPoint += point(readedBook);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment