<commit_before>console.log("Hello from Console");<commit_msg>Js will add new elements <li> to <ul> for given input. also added the validation for input values the message will be displayed on the input placeholder<commit_after>console.log("Hello from Console");
const formIdRegistrar = document.getElementById('registrar');
const formInput = formIdRegistrar.getElementsByTagName('input')[0];
const formButton = formIdRegistrar.getElementsByTagName('button')[0];

formIdRegistrar.addEventListener('submit',(e)=>{
    e.preventDefault(); //to cancel the event to show o/p
    
    let ul = document.getElementById('invitedList');
    let li = document.createElement('li');
        li.textContent = formInput.value;
        if (li.textContent == '') {
            formInput.placeholder = "Please Enter the Correct Name"
        } else {
            ul.appendChild(li);
            formInput.placeholder = "Invite Someone"
        }
        formInput.value = '';
});
{'fraction_non_alphanumeric': 0.11850311850311851, 'fraction_numerical': 0.002079002079002079, 'mean_word_length': 3.767326732673267, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6734165', 'n_tokens_mistral': 259, 'n_tokens_neox': 257, 'n_words': 71}