How to add a child table after creating a new document using frappe.new_doc() in JavaScript?

pr_item.item_code = "Item A";
pr_item.qty = 10;

try it.