simple js code to handle todo list