Skip to content

Commit

Permalink
Capitalise the first letter of nutritions
Browse files Browse the repository at this point in the history
  • Loading branch information
helenclx committed Oct 31, 2023
1 parent 2b842a5 commit c1af620
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Food-Recipe/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async function fetchResponses(recipeName) {
if (obj) {
for (const key in obj) {
if (obj.hasOwnProperty(key) && key !== "updated_at") {
result += `${key}: ${obj[key]}, `;
result += `${capitalize_firstLetter(key)}: ${obj[key]}, `;
}
}
result = result.slice(0, -2).split(',').map(item => `<li>${item}</li>`).join("");
Expand Down

0 comments on commit c1af620

Please sign in to comment.