We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
there is a full stop at the end of sentence that cuased my code to fail.
constall_req="All fields are required.";consthandleSubmit=(e)=>{e.preventDefault();// TODO: Add logic to validate inputs and display submitted data// HINT: You can use the setError function// HINT: You can use the setSubmittedData function as belowif(name.trim()===""||email===""||message===""){setError(all_req)}setSubmittedData({name,email,message});setName("");setEmail("");setMessage("");};
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Contact Form
You are viewing a single comment's thread. Return to all comments →
there is a full stop at the end of sentence that cuased my code to fail.