From the course: AI Pair Programming with GitHub Copilot
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Presentation logic and HTML - Github Copilot Tutorial
From the course: AI Pair Programming with GitHub Copilot
Presentation logic and HTML
- [Instructor] So now that we're talking to our API, it's time to get some rendering done, and a good place for that would be this renderExpense method, which right now just puts to the console. Let's go ahead and delete this console.table, and right off the bat it's offering a solution, but I'm not sure this is the solution for this. We don't really want divs, so I'm going to tell it to create a table row with td for name, amount, and timestamp. Great, so we're populating a table with these. So let's try this out. So it's created a table row, and maybe we should use template strings like it did before, so use templates strings. Now this is not going to be a production grade app. Important to mention. Not so efficient, not so secure. This is just us playing around here. Probably better to use a framework for this good HTML scaping as well. But for this purpose, this works out for us. Good, so not too bad. Now I'm going to also format the timestamp. So make the timestamp human…