You must be logged in to access this section.
Login/Sign upconst fname = prompt("لطفاً نام خود را وارد کنید:"); const lname = prompt("لطفاً نام خانوادگی خود را وارد کنید:"); const age = prompt("لطفاً سن خود را وارد کنید:"); # Create an object to send to the server const data = { fname: fname, lname: lname, age: age }; # Send POST request using Fetch API fetch('/test.php', { method: 'POST', headers: { 'Content-Type': 'application/json' # Specifies the type of content }, body: JSON.stringify(data) # Converts data to json format }) .then(response => { if (!response.ok) { throw new Error('Network response was not ok'); } return response.json(); # Expect the JSON reply }) .then(data => { console.log('Success:', data); # Display of success in the console }) .catch((error) => { console.error('Error:', error); # Display the error in the console });
Submitting answers is currently unavailable.
Write a class that receives two numbers and the methods of subtraction, multiplication and division can be called. By calling each method, the necessary calculations are required and the result is returned in
Write a program that prints an integers in the output. Get the desired interval from the input.
Suppose we have the following 2 tables Users-> name, idbooks-> User_id, id, name 1- Write a query that shows user-related books at No. 2- Write a query to user names a ...
Write a function that receives a number and specifies or not to be paired by returning TRUE or FALSE
Write a program that receives a number from the input and increases the number 2 and prints in the output. This trend continues until the number 0 is not arrived
Define a class of User that has a username, email and password and the following methods. Print: Print username and email in the output IS_Gmail: Check whether the user's email is Gmail and ...
You must be logged in to access this section.
Login/Sign up If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.