برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نامconst 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 program that receives 2 numeric value from the input and stores in variables A and B. Then move the values of these two variables (the value of variable A is to be stored within B and the value of variable B is saved within a)
Write a program that translates the following words from Farsi to English and vice versa. The program must be implemented infinitely and it is possible to add new words easily words: Hello = hello goodbye = bye Kata ...
Write a program that receives a number and prints the first counters in the output
Write a program that receives a one -digit number from the input and finds the coefficient of smaller than 100 of those numbers and prints in the output
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نام 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.