JSFiddle - React, Tailwind, and code Playground

by Umesh Patil

HTML

<div >
	<input type="text" id="input"/>
	<button type="button" id="addBtn">Add</button>
</div>
<ol id="todomain">
</ol>

CSS

.squere{
	width:30%;
	height:80px;
	margin:1.5%;
	float:left;
}
.reset{
	cursor:pointer;
}

JavaScript

var input = document.getElementById("input");
var addBtn = document.getElementById("addBtn");
var todomain = document.getElementById("todomain");
var addData = '';
var completed = false;


addBtn.addEventListener('click', function(){
	var inputVal = input.value
	/* alert('todoList.name') */
	/* if(inputVal){
		for(var i=0; i< todoList.length; i++){
			console.count(todoList.name)
			todoList.push({
				name: this.inputVal,
				completed:false
			})
			
		}
		addData += "<li>"+todoList.name +"</li>"
		todomain.innerHTML = addData;
		input.value = '';
		input.focus()
	} */
})