**while let n=10; let i=0; while(i<=n){ i++; console.log(i); }
*do while let n=10; do{ i++; console.log(i); }while(i<=n);
****Functions are two types ***** **user defined no arg no return no arg with return with arg no return with arg with return
*****todo list******
<form>
<input type="text" id="todo" value="" placeholder="Enter a TODO"/>
<input type ="button" value="ADD" id="btn"/>
</form>
<table>
<thead>
<tr>
<th>SNO</th>
<th>Description</th>
<th>Action</th>
</tr>
</thead>
</table>
let itemList =[]; let addItem = () =>{ let item=document.getElementById('todo').value; itemList.push(item); console.log(itemList); document.getElementById('todo').value=""; getItem(); } let getItem =() =>{ let emptystr=""; let sno=0; itemList.forEach(function(value,index){ sno +=1; emptystr += "" +sno+""+value+"Remove"
})
document.getElementById('tbl').innerHTML=emptystr; }