How to append a newly created input to newly created li element?

How to append a newly created input to newly created li element?

I want to dynamically add <li> elements to a <ul> .But every <li> element should have a input element inside it. So both of them should be newly created and appended. Can someone tell me how it is done

function add_down() {

var node = document.createElement("LI"); var element = document.createElement("input"); element.type = text; element.placeholder = "Enter Name"; document.getElementById("first").appendChild(node);

//how to append element to node

} <div style=""> <div> <ul id="start" style="list-style:none"> <li><input type="text" placeholder="category"></li> </ul> </div> <div><input type="button" value="Add" onclick="add_down()"></div> </div>

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

JavaScript Tutorial: if-else Statement in JavaScript

This JavaScript tutorial is a step by step guide on JavaScript If Else Statements. Learn how to use If Else in javascript and also JavaScript If Else Statements. if-else Statement in JavaScript. JavaScript's conditional statements: if; if-else; nested-if; if-else-if. These statements allow you to control the flow of your program's execution based upon conditions known only during run time.

How to Retrieve full Profile of LinkedIn User using Javascript

I am trying to retrieve the full profile (especially job history and educational qualifications) of a linkedin user via the Javascript (Fetch LinkedIn Data Using JavaScript)

Java vs. JavaScript: Know The Difference

Java vs. JavaScript: Know the Difference, Java vs. JavaScript: What's the Difference? Java vs. JavaScript: Major Similarities and Differences. pros and cons of JavaScript and Java.