Avatar ·

How to add a new row to an HTML table using jQuery?

Hello everyone! I'm new to JavaScript and jQuery, and I've encountered a problem while working with HTML tables. I have a simple table where I need to dynamically add rows when a button is clicked. I've tried several methods, but nothing works as expected. Here's my code: ```html
Name Age
Ivan 25
``` ```javascript $('#addRow').click(function() { // I tried this: $('#myTable').append('New30'); // And this: $('#myTable tr:last').after('New30'); }); ``` The problem is that the row