{"id":39548,"date":"2024-05-18T14:30:36","date_gmt":"2024-05-18T10:00:36","guid":{"rendered":"https:\/\/wpadmin.maktabkhooneh.org\/mag\/?p=39548"},"modified":"2026-04-06T15:47:41","modified_gmt":"2026-04-06T12:17:41","slug":"async-and-await-in-js","status":"publish","type":"post","link":"https:\/\/maktabkhooneh.org\/mag\/async-and-await-in-js\/","title":{"rendered":"Async \u0648 Await \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a\u061b \u0645\u0641\u0647\u0648\u0645 + \u06a9\u0627\u0631\u0628\u0631\u062f"},"content":{"rendered":"<p>Async \u0648 Await \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u06cc\u06a9 \u0648\u06cc\u0698\u06af\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0628\u0647 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633 \u0627\u06cc\u0646 \u0627\u0645\u06a9\u0627\u0646 \u0631\u0627 \u0645\u06cc\u200c\u062f\u0647\u062f \u062a\u0627 \u06a9\u062f \u0646\u0627\u0647\u0645\u06af\u0627\u0645 (Asynchronous) \u0628\u0647 \u0634\u06cc\u0648\u0647\u200c\u0627\u06cc \u0628\u0647\u062a\u0631 \u06a9\u0627\u0631 \u06a9\u0646\u062f. \u062f\u0631\u0648\u0627\u0642\u0639\u060c Async \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0627\u06cc\u0646 \u0627\u0645\u06a9\u0627\u0646 \u0631\u0627 \u0628\u0647 \u0634\u0645\u0627 \u0645\u06cc\u200c\u062f\u0647\u062f \u06a9\u0647 \u06a9\u062f\u0647\u0627\u06cc \u0646\u0627\u0647\u0645\u06af\u0627\u0645 \u0631\u0627 \u062e\u06cc\u0644\u06cc \u0631\u0627\u062d\u062a\u200c\u062a\u0631 \u0628\u0646\u0648\u06cc\u0633\u06cc\u062f \u0648 \u0622\u0646\u200c\u0647\u0627 \u0631\u0627 \u062f\u0631\u06a9 \u06a9\u0646\u06cc\u062f. \u062a\u0648\u0627\u0628\u0639 Async \u0647\u0645\u06cc\u0634\u0647 \u06cc\u06a9 Promise \u0628\u0631\u0645\u06cc\u200c\u06af\u0631\u062f\u0627\u0646\u0646\u062f. \u06a9\u0644\u06cc\u062f\u0648\u0627\u0698\u0647 Await \u0646\u06cc\u0632 \u0647\u0645\u06cc\u0634\u0647 \u0628\u0627 \u062a\u0627\u0628\u0639\u200c\u0647\u0627\u06cc Async \u0628\u0647\u200c\u06a9\u0627\u0631 \u0645\u06cc\u200c\u0631\u0648\u062f. \u0627\u06af\u0631 \u0645\u06cc\u200c\u062e\u0648\u0627\u0647\u06cc\u062f \u0628\u062f\u0627\u0646\u06cc\u062f \u06a9\u0647 \u062f\u0642\u06cc\u0642\u0627\u064b Async await \u0686\u06cc\u0633\u062a \u0648 \u0628\u0627 \u0646\u062d\u0648\u0647 \u0639\u0645\u0644\u06a9\u0631\u062f \u0622\u0646 \u0628\u0647\u062a\u0631 \u0622\u0634\u0646\u0627 \u0634\u0648\u06cc\u062f\u060c \u0627\u0632 \u0634\u0645\u0627 \u062f\u0639\u0648\u062a \u0645\u06cc\u200c\u0634\u0648\u062f \u062a\u0627 \u0627\u0646\u062a\u0647\u0627\u06cc \u0627\u06cc\u0646 \u0631\u0627\u0647\u0646\u0645\u0627 \u0628\u0627 \u0645\u0627 \u0647\u0645\u0631\u0627\u0647 \u0628\u0627\u0634\u06cc\u062f.<\/p>\n<h2>\u0622\u0645\u0648\u0632\u0634 await async \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a<\/h2>\n<p>\u06cc\u06a9 \u06a9\u0627\u0641\u06cc\u200c\u0634\u0627\u067e \u0628\u0632\u0631\u06af \u0631\u0627 \u062f\u0631 \u0646\u0638\u0631 \u0628\u06af\u06cc\u0631\u06cc\u062f \u06a9\u0647 \u062a\u0646\u0647\u0627 \u06cc\u06a9 \u0646\u0641\u0631 \u0645\u0633\u0626\u0648\u0644\u06cc\u062a \u0622\u0645\u0627\u062f\u0647 \u06a9\u0631\u062f\u0646 \u0633\u0641\u0627\u0631\u0634\u200c\u0647\u0627 \u0631\u0627 \u0628\u0631\u0639\u0647\u062f\u0647 \u062f\u0627\u0631\u062f. \u0628\u0627\u0631\u06cc\u0633\u062a\u0627 \u0628\u0627\u06cc\u062f \u06cc\u06a9\u06cc\u200c\u06cc\u06a9\u06cc \u0633\u0641\u0627\u0631\u0634\u200c\u0647\u0627 \u0631\u0627 \u0622\u0645\u0627\u062f\u0647 \u06a9\u0646\u062f \u0648 \u0633\u0631 \u0645\u06cc\u0632 \u0645\u0634\u062a\u0631\u06cc \u0628\u0628\u0631\u062f. \u0637\u0628\u06cc\u0639\u062a\u0627\u064b \u0686\u0646\u06cc\u0646 \u0631\u0648\u0646\u062f\u06cc \u0628\u0631\u0627\u06cc \u06cc\u06a9 \u06a9\u0627\u0641\u06cc\u200c\u0634\u0627\u067e \u0628\u0632\u0631\u06af \u0628\u0633\u06cc\u0627\u0631 \u06a9\u0646\u062f \u0627\u0633\u062a \u0648 \u0646\u0627\u0631\u0636\u0627\u06cc\u062a\u06cc \u0645\u0634\u062a\u0631\u06cc\u0627\u0646 \u0631\u0627 \u062f\u0631 \u067e\u06cc \u062f\u0627\u0631\u062f. \u0627\u06cc\u0646 \u0645\u062b\u0627\u0644 \u0631\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0628\u0647 Async \u0648 Await \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u06cc\u0627 \u0646\u0627\u0647\u0645\u06af\u0627\u0645\u06cc \u06cc\u0627 \u0646\u0627\u0647\u0645\u0632\u0645\u0627\u0646\u06cc \u062a\u0639\u0645\u06cc\u0645 \u062f\u0627\u062f. \u062f\u0631 \u06a9\u0627\u0641\u06cc\u200c\u0634\u0627\u067e \u0628\u0627\u0631\u06cc\u0633\u062a\u0627 \u0628\u0647 \u06cc\u06a9 \u0627\u0633\u062a\u0627\u062f \u0686\u0646\u062f\u0648\u0638\u06cc\u0641\u0647 \u062a\u0628\u062f\u06cc\u0644 \u0645\u06cc\u200c\u0634\u0648\u062f \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0627\u0646\u0648\u0627\u0639 \u0642\u0647\u0648\u0647 \u0631\u0627 \u0628\u0647 \u0637\u0648\u0631 \u0647\u0645\u0632\u0645\u0627\u0646 \u0633\u0631\u0648 \u06a9\u0646\u062f \u0648 \u0628\u0647 \u0635\u0648\u0631\u062a \u062f\u0648\u0631\u0647\u200c\u0627\u06cc \u067e\u06cc\u0634\u0631\u0641\u062a \u062f\u0631 \u0646\u062d\u0648\u0647 \u062f\u0645\u200c\u0622\u0648\u0631\u06cc \u0642\u0647\u0648\u0647 \u0631\u0627 \u0645\u0648\u0631\u062f \u0628\u0631\u0631\u0633\u06cc \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u062f\u0647\u062f.<\/p>\n<div style=\"background-color: #fffceb; padding: 0px 8px; align-items: flex-start; border: 1px solid #ffd81a; border-radius: 4px; box-shadow: rgba(255, 216, 26, 0.16) 0px 8px 17px 0px, rgba(255, 216, 26, 0.16) 0px 6px 20px 0px; display: flex; flex-flow: row wrap; justify-content: space-around; margin: 0px; overflow: hidden; position: relative; transition: border 0.25s ease 0s, box-shadow 0.25s ease 0s, background-color 0.2s ease 0s; flex-direction: row; box-sizing: border-box;\">\n<div style=\"width: 16%; overflow: hidden; border: 0px solid #e5e7eb; box-sizing: border-box;\"><img decoding=\"async\" style=\"--smush-placeholder-width: 1000px; --smush-placeholder-aspect-ratio: 1000\/420;border-radius: 4px; width: 100%; min-height: 90px; transition: transform 0.25s ease 0s; margin: 0px; height: auto; max-width: 100%; display: block; vertical-align: middle; box-sizing: border-box;\" data-src=\"https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2020\/08\/javascript_banner_sxve2l.jpg\" alt=\"\" title=\"\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\"><\/div>\n<div style=\"padding: 12px 16px 0px; position: relative; width: 65%; display: flex; flex: 1 1 auto; flex-direction: column; gap: 8px; border: 0px solid #e5e7eb; box-sizing: border-box;\">\n<div id=\"ad-title\" style=\"color: #0054ad; font-size: 16px; transition: color 0.2s ease-in-out 0s; align-items: center; display: flex; font-weight: 600; gap: 8px; line-height: 28px; border: 0px solid #e5e7eb; box-sizing: border-box;\">\u0645\u0631\u062c\u0639 \u06a9\u0627\u0645\u0644 \u0648 \u062a\u062e\u0635\u0635\u06cc \u0622\u0645\u0648\u0632\u0634 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a + \u0627\u0639\u0637\u0627\u06cc \u06af\u0648\u0627\u0647\u06cc\u0646\u0627\u0645\u0647 \u062f\u0648\u0631\u0647<\/div>\n<\/div>\n<div style=\"bottom: 12px; left: 0px; position: absolute; margin-left: 12px; border: 0px solid #e5e7eb; box-sizing: border-box;\"><a href=\"https:\/\/maktabkhooneh.org\/learn\/java-script\/\" type=\"button\"> <span class=\"clickable-link\" style=\"box-shadow: rgba(0, 196, 154, 0.64) 0px 5px 8px -1px; background-color: #00c49a; width: 132px; border-radius: 6px; color: #ffffff; display: block; font-size: 14px; font-weight: bold; line-height: 23.8px; margin: 12px auto 0px; padding: 6px; text-align: center; transition: background-color 0.2s ease-in-out 0s, transform 0.2s ease-in-out 0s, box-shadow 0.2s ease-in-out 0s; border: 0px solid #e5e7eb; box-sizing: border-box;\">\u06a9\u0644\u06cc\u06a9 \u06a9\u0646\u06cc\u062f<\/span><\/a><\/div>\n<\/div>\n<p>\u0686\u0646\u06cc\u0646 \u0631\u0648\u06cc\u06a9\u0631\u062f\u06cc \u062a\u0636\u0645\u06cc\u0646 \u0645\u06cc\u200c\u06a9\u0646\u062f \u06a9\u0647 \u062a\u0645\u0627\u0645\u06cc \u0633\u0641\u0627\u0631\u0634\u200c\u0647\u0627\u06cc \u0642\u0647\u0648\u0647 \u0628\u0647 \u0633\u0631\u0639\u062a \u0622\u0645\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f \u0648 \u062f\u0631 \u067e\u06cc \u0622\u0646 \u0645\u0634\u062a\u0631\u06cc\u0627\u0646 \u0646\u06cc\u0632 \u0631\u0636\u0627\u06cc\u062a \u06a9\u0627\u0645\u0644 \u062e\u0648\u0627\u0647\u0646\u062f \u062f\u0627\u0634\u062a. \u0627\u0632 \u06a9\u0627\u0641\u06cc\u200c\u0634\u0627\u067e \u0628\u0631\u06af\u0631\u062f\u06cc\u0645 \u0628\u0647 \u062f\u0646\u06cc\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc\u061b \u062a\u06a9\u0646\u06cc\u06a9\u200c\u0647\u0627\u06cc\u06cc \u0645\u062b\u0644 \u0645\u0641\u0647\u0648\u0645 async \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f \u06a9\u0647 \u0628\u0627 \u06a9\u0645\u06a9 \u0622\u0646 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u0645 \u0686\u0646\u062f\u06cc\u0646 \u06a9\u0627\u0631 \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0647\u0645\u0632\u0645\u0627\u0646 \u0628\u0627 \u06a9\u06cc\u0641\u06cc\u062a \u0639\u0627\u0644\u06cc \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u0645.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"size-full wp-image-39549 aligncenter\" src=\"https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2024\/05\/word-image-39548-1.jpeg\" alt=\"\" width=\"780\" height=\"470\" title=\"\" srcset=\"https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2024\/05\/word-image-39548-1.jpeg 780w, https:\/\/maktabkhooneh.org\/mag\/wp-content\/smush-webp\/2024\/05\/word-image-39548-1-300x181.jpeg.webp 300w, https:\/\/maktabkhooneh.org\/mag\/wp-content\/smush-webp\/2024\/05\/word-image-39548-1-768x463.jpeg.webp 768w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/p>\n<p>Async \u0648 Await \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0627\u062c\u0627\u0632\u0647 \u0645\u06cc\u200c\u062f\u0647\u062f \u062a\u0627 \u0633\u0627\u06cc\u0631 \u06a9\u062f\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u062f\u0631 \u0627\u0646\u062a\u0638\u0627\u0631 \u062a\u06a9\u0645\u06cc\u0644 \u06a9\u0627\u0631 \u0645\u0648\u0631\u062f\u0646\u0638\u0631 \u0647\u0633\u062a\u0646\u062f\u060c \u0628\u0647 \u0635\u0648\u0631\u062a \u0647\u0645\u0632\u0645\u0627\u0646 \u0627\u062c\u0631\u0627 \u0634\u0648\u0646\u062f. Javascript \u06cc\u06a9 \u0632\u0628\u0627\u0646 \u062a\u06a9\u200c\u0631\u0634\u062a\u0647\u200c\u0627\u06cc \u0627\u0633\u062a\u061b \u0628\u0647\u200c\u0627\u06cc\u0646 \u0645\u0639\u0646\u0627 \u06a9\u0647 \u0648\u0638\u0627\u06cc\u0641 \u063a\u06cc\u0631\u0647\u0645\u0632\u0645\u0627\u0646 \u0628\u0647 \u06a9\u0645\u06a9 \u0635\u0641 \u0628\u0631\u06af\u0634\u062a\u06cc \u0648 \u062d\u0644\u0642\u0647 \u0631\u0648\u06cc\u062f\u0627\u062f \u0642\u0627\u0628\u0644 \u0645\u062f\u06cc\u0631\u06cc\u062a \u0647\u0633\u062a\u0646\u062f. \u0628\u0647 \u06a9\u0645\u06a9 \u0627\u06cc\u0646 \u0642\u0627\u0628\u0644\u06cc\u062a \u062a\u0648\u0627\u0628\u0639 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u062a\u0648\u0627\u0644\u06cc \u0648 \u06cc\u06a9\u06cc \u0628\u0639\u062f \u0627\u0632 \u062f\u06cc\u06af\u0631\u06cc \u0627\u062c\u0631\u0627 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f \u0648 \u0647\u0631 \u06cc\u06a9 \u0645\u0646\u062a\u0638\u0631 \u067e\u0627\u06cc\u0627\u0646 \u06cc\u0627\u0641\u062a\u0646 \u0639\u0645\u0644\u06cc\u0627\u062a \u0642\u0628\u0644\u06cc \u0647\u0633\u062a\u0646\u062f \u062a\u0627 \u0628\u0631\u0627\u06cc \u0627\u062c\u0631\u0627 \u0628\u0647 \u0639\u0645\u0644\u06cc\u0627\u062a \u0628\u0639\u062f\u06cc \u0628\u0631\u0648\u0646\u062f. \u0627\u0632\u0627\u06cc\u0646\u200c\u0631\u0648\u060c \u06a9\u062f\u0647\u0627 \u062f\u0631 \u062c\u0627\u0648\u0627\u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0627\u0632 \u0628\u0627\u0644\u0627 \u0628\u0647 \u067e\u0627\u06cc\u06cc\u0646 \u0628\u0647 \u0635\u0648\u0631\u062a \u062e\u0637\u06cc \u0627\u062c\u0631\u0627 \u062e\u0648\u0627\u0647\u0646\u062f \u0634\u062f.<\/p>\n<p>\u0628\u0627 \u062f\u0631\u06a9 \u0645\u0641\u0647\u0648\u0645 async \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0634\u0645\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u06a9\u062f\u0647\u0627\u06cc promises-based \u0646\u0627\u0647\u0645\u06af\u0627\u0645 \u0631\u0627 \u0628\u0647\u200c\u06af\u0648\u0646\u0647\u200c\u0627\u06cc \u0628\u0646\u0648\u06cc\u0633\u06cc\u062f \u06a9\u0647 \u0628\u062a\u0648\u0627\u0646\u0646\u062f \u0628\u0647 \u0635\u0648\u0631\u062a \u0647\u0645\u0632\u0645\u0627\u0646 \u0627\u062c\u0631\u0627 \u0634\u0648\u0646\u062f\u061b \u0628\u062f\u0648\u0646\u200c\u0627\u06cc\u0646\u06a9\u0647 \u0627\u062e\u062a\u0644\u0627\u0644\u06cc \u062f\u0631 \u0631\u0648\u0646\u062f \u0627\u0646\u062c\u0627\u0645 \u06a9\u0627\u0631 \u067e\u06cc\u0634 \u0622\u06cc\u062f. \u062a\u0627\u0628\u0639 async \u0647\u0645\u06cc\u0634\u0647 \u06cc\u06a9 \u0645\u0642\u062f\u0627\u0631 \u0645\u0634\u062e\u0635 \u0631\u0627 \u0628\u0631\u0645\u06cc\u200c\u06af\u0631\u062f\u0627\u0646\u062f \u0648 \u0622\u0646 \u0645\u0642\u062f\u0627\u0631 Promises \u0647\u0633\u062a\u0646\u062f.<\/p>\n<pre>async\u00a0function\u00a0myFunction() {\n\u00a0\u00a0return\u00a0\"Hello\";\n}<\/pre>\n<p>\u062f\u0631 \u0627\u062f\u0627\u0645\u0647 \u06cc\u06a9 \u0645\u062b\u0627\u0644 \u0633\u0627\u062f\u0647 \u0627\u0632 Async \u0648 Await \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u062e\u0648\u0627\u0647\u06cc\u0645 \u062f\u0627\u0634\u062a:<\/p>\n<div class=\"code-container\">\n<div id=\"highlighter_895054\" class=\"syntaxhighlighter nogutter night\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\" style=\"text-align: left;\"><code class=\"plain\">const getData = async () =&gt; {<\/code><\/div>\n<div class=\"line number2 index1 alt1\" style=\"text-align: left;\"><code class=\"undefined spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">let data = <\/code><code class=\"string\">\"Hello World\"<\/code><code class=\"plain\">;<\/code><\/div>\n<div class=\"line number3 index2 alt2\" style=\"text-align: left;\"><code class=\"undefined spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"keyword\">return<\/code> <code class=\"plain\">data;<\/code><\/div>\n<div class=\"line number4 index3 alt1\" style=\"text-align: left;\"><code class=\"plain\">}<\/code><\/div>\n<div class=\"line number5 index4 alt2\" style=\"text-align: left;\">\u00a0<\/div>\n<div class=\"line number6 index5 alt1\" style=\"text-align: left;\"><code class=\"plain\">getData().then(data =&gt; console.log(data));<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u062e\u0631\u0648\u062c\u06cc \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u0627\u0633\u062a:<\/p>\n<pre>Hello World\n<\/pre>\n<p>\u062f\u0631 \u0645\u062b\u0627\u0644 \u0628\u0627\u0644\u0627 \u06cc\u06a9 \u062a\u0627\u0628\u0639 \u063a\u06cc\u0631\u0647\u0645\u06af\u0627\u0645 getData \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0633\u06cc\u0646\u062a\u06a9\u0633 \u06cc\u0627 \u0646\u062d\u0648\u0647 \u0646\u0648\u0634\u062a\u0627\u0631 \u062a\u0627\u0628\u0639 \u067e\u06cc\u06a9\u0627\u0646 (arrow function) \u0628\u0647 \u0647\u0645\u0631\u0627\u0647 \u06a9\u0644\u06cc\u062f\u0648\u0627\u0698\u0647 async \u0646\u0645\u0627\u06cc\u0634 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a. \u062f\u0631\u0648\u0646 \u0627\u06cc\u0646 \u062a\u0627\u0628\u0639 \u06cc\u06a9 \u0645\u062a\u063a\u06cc\u0631 \u0628\u0627 \u0645\u0642\u062f\u0627\u0631 \u0631\u0634\u062a\u0647\u200c\u0627\u06cc \u201cHello World\u201d \u0646\u0648\u0634\u062a\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a. \u0633\u067e\u0633\u060c \u062a\u0627\u0628\u0639 \u0627\u06cc\u0646 \u0645\u0642\u062f\u0627\u0631 \u0631\u0627 \u0628\u0631\u0645\u06cc\u200c\u06af\u0631\u062f\u0627\u0646\u062f.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-39553 size-full lazyload\" data-src=\"https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2024\/05\/word-image-39548-5.jpeg\" alt=\"\u06a9\u0644\u06cc\u062f\u0648\u0627\u0698\u0647 Await\" width=\"780\" height=\"470\" title=\"\" data-srcset=\"https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2024\/05\/word-image-39548-5.jpeg 780w, https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2024\/05\/word-image-39548-5-300x181.jpeg 300w, https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2024\/05\/word-image-39548-5-768x463.jpeg 768w\" data-sizes=\"(max-width: 780px) 100vw, 780px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 780px; --smush-placeholder-aspect-ratio: 780\/470;\" \/><\/p>\n<h2>\u06a9\u0644\u06cc\u062f\u0648\u0627\u0698\u0647 Await<\/h2>\n<p>\u0627\u06cc\u0646 \u06a9\u0644\u06cc\u062f\u0648\u0627\u0698\u0647 \u0628\u0647\u200c\u0627\u06cc\u0646 \u062f\u0644\u06cc\u0644 \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u06af\u06cc\u0631\u062f \u062a\u0627 \u0645\u0646\u062a\u0638\u0631 Promise \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u0645\u0627\u0646\u062f. \u062f\u0631\u0648\u0627\u0642\u0639\u060c \u0628\u0627\u0639\u062b \u0645\u06cc\u200c\u0634\u0648\u062f \u06a9\u0647 \u0628\u0644\u0648\u06a9 \u06a9\u062f \u0645\u0646\u062a\u0638\u0631 \u0628\u0645\u0627\u0646\u062f \u062a\u0627 \u0645\u0642\u062f\u0627\u0631 promise \u06cc\u06a9 \u0646\u062a\u06cc\u062c\u0647 \u0631\u0627 \u0628\u0631\u06af\u0631\u062f\u0627\u0646\u062f.<\/p>\n<pre>let\u00a0value =\u00a0await\u00a0promise;<\/pre>\n<p>\u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u06a9\u0627\u0631\u0628\u0631\u062f \u0633\u0627\u062f\u0647 Await \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0631\u0627 \u0646\u0645\u0627\u06cc\u0634 \u0645\u06cc\u200c\u062f\u0647\u062f:<\/p>\n<div class=\"line number1 index0 alt2\" style=\"text-align: left;\"><code class=\"plain\">const getData = async () =&gt; {<\/code><\/div>\n<div class=\"line number2 index1 alt1\" style=\"text-align: left;\"><code class=\"undefined spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">let y = await <\/code><code class=\"string\">\"Hello World\"<\/code><code class=\"plain\">;<\/code><\/div>\n<div class=\"line number3 index2 alt2\" style=\"text-align: left;\"><code class=\"undefined spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">console.log(y);<\/code><\/div>\n<div class=\"line number4 index3 alt1\" style=\"text-align: left;\"><code class=\"plain\">}<\/code><\/div>\n<div class=\"line number5 index4 alt2\" style=\"text-align: left;\">\u00a0<\/div>\n<div class=\"line number6 index5 alt1\" style=\"text-align: left;\"><code class=\"plain\">console.log(1);<\/code><\/div>\n<div class=\"line number7 index6 alt2\" style=\"text-align: left;\"><code class=\"plain\">getData();<\/code><\/div>\n<div class=\"line number8 index7 alt1\" style=\"text-align: left;\"><code class=\"plain\">console.log(2);<\/code><\/div>\n<p>\u062e\u0631\u0648\u062c\u06cc:<\/p>\n<pre>\u06f1\n\u06f2\nHello World\n<\/pre>\n<p>\u062f\u0631 \u0645\u062b\u0627\u0644 \u0628\u0627\u0644\u0627 \u06cc\u06a9 \u062a\u0627\u0628\u0639 \u063a\u06cc\u0631\u0647\u0645\u06af\u0627\u0645 getData \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0633\u06cc\u0646\u062a\u06a9\u0633 \u06cc\u0627 \u0646\u062d\u0648\u0647 \u0646\u0648\u0634\u062a\u0627\u0631 \u062a\u0648\u0627\u0628\u0639 \u067e\u06cc\u06a9\u0627\u0646 \u062a\u0639\u0631\u06cc\u0641 \u0634\u062f\u0647 \u0627\u0633\u062a \u06a9\u0647 \u0627\u0632 \u06a9\u0644\u06cc\u062f\u0648\u0627\u0698\u0647 Async \u0648 Await \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u062f\u0631\u0648\u0646 \u0627\u06cc\u0646 \u062a\u0627\u0628\u0639 \u06cc\u06a9 await \u062a\u0639\u0631\u06cc\u0641 \u0634\u062f\u0647 \u0627\u0633\u062a \u06a9\u0647 \u0627\u062c\u0631\u0627\u06cc \u06a9\u062f\u0647\u0627\u06cc \u062f\u0631\u0648\u0646 \u062a\u0627\u0628\u0639 \u062a\u0627 \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 promise \u0628\u0631\u06af\u0631\u062f\u062f \u06cc\u0627 \u0627\u0635\u0637\u0644\u0627\u062d\u0627\u064b return \u0634\u0648\u062f \u0631\u0627 \u0645\u062a\u0648\u0642\u0641 \u062e\u0648\u0627\u0647\u062f \u06a9\u0631\u062f. \u0645\u0642\u062f\u0627\u0631\u06cc \u06a9\u0647 \u062f\u0631 \u0627\u062c\u0631\u0627\u06cc \u0622\u0646 \u062a\u0648\u0642\u0641 \u0645\u0648\u0642\u062a \u0627\u06cc\u062c\u0627\u062f \u0634\u062f\u0647 \u0627\u0633\u062a\u060c \u0645\u0642\u062f\u0627\u0631 \u0631\u0634\u062a\u0647\u200c\u0627\u06cc \u201cHello World\u201d \u0627\u0633\u062a \u06a9\u0647 \u06cc\u06a9 promise \u0646\u06cc\u0633\u062a. \u0627\u0645\u0627 \u0628\u0647 \u062f\u0644\u06cc\u0644 \u0639\u0645\u0644\u06a9\u0631\u062f \u0648 \u0648\u0638\u06cc\u0641\u0647\u200c\u0627\u06cc \u06a9\u0647 Async function \u062f\u0627\u0631\u062f\u060c \u0628\u0644\u0627\u0641\u0627\u0635\u0644\u0647 \u0628\u0631\u0645\u06cc\u200c\u06af\u0631\u062f\u062f \u0648 \u0647\u0645\u0686\u0648\u0646 \u06cc\u06a9 \u067e\u0631\u0627\u0645\u06cc\u0633 \u0639\u0645\u0644 \u0645\u06cc\u200c\u06a9\u0646\u062f.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-39557 size-full lazyload\" data-src=\"https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2024\/05\/word-image-39548-9.jpeg\" alt=\"\u0645\u062b\u0627\u0644\u200c\u0647\u0627\u06cc\u06cc \u0627\u0632 Async \u0648 Await \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a\" width=\"780\" height=\"470\" title=\"\" data-srcset=\"https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2024\/05\/word-image-39548-9.jpeg 780w, https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2024\/05\/word-image-39548-9-300x181.jpeg 300w, https:\/\/maktabkhooneh.org\/mag\/wp-content\/smush-webp\/2024\/05\/word-image-39548-9-768x463.jpeg.webp 768w\" data-sizes=\"(max-width: 780px) 100vw, 780px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 780px; --smush-placeholder-aspect-ratio: 780\/470;\" \/><\/p>\n<h2>\u0645\u062b\u0627\u0644\u200c\u0647\u0627\u06cc\u06cc \u0627\u0632 Async \u0648 Await \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a<\/h2>\n<p>\u062f\u0631 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u0645\u0627 \u0686\u0646\u062f promise \u0631\u0627 \u062f\u0631 \u06cc\u06a9 \u0645\u062a\u062f \u0627\u062c\u0631\u0627 \u06a9\u0631\u062f\u06cc\u0645 \u0648 \u0622\u0646 \u0645\u062a\u062f \u062f\u0631\u0646\u0647\u0627\u06cc\u062a \u0646\u062a\u06cc\u062c\u0647\u200c\u0627\u06cc \u06a9\u0647 \u0645\u06cc\u200c\u062e\u0648\u0627\u0647\u06cc\u0645 \u0631\u0627 \u0646\u0645\u0627\u06cc\u0634 \u0645\u06cc\u200c\u062f\u0647\u062f:<\/p>\n<div class=\"code-container\">\n<div id=\"highlighter_769297\" class=\"syntaxhighlighter nogutter night\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\" style=\"text-align: left;\"><code class=\"keyword\">function<\/code> <code class=\"plain\">asynchronous_operational_method() {<\/code><\/div>\n<div class=\"line number2 index1 alt1\" style=\"text-align: left;\"><code class=\"undefined spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">let first_promise = <\/code><\/div>\n<div class=\"line number3 index2 alt2\" style=\"text-align: left;\"><code class=\"undefined spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"keyword\">new<\/code> <code class=\"plain\">Promise((resolve, reject) =&gt; resolve(<\/code><code class=\"string\">\"Hello\"<\/code><code class=\"plain\">));<\/code><\/div>\n<div class=\"line number4 index3 alt1\" style=\"text-align: left;\"><code class=\"undefined spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">let second_promise = <\/code><\/div>\n<div class=\"line number5 index4 alt2\" style=\"text-align: left;\"><code class=\"undefined spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"keyword\">new<\/code> <code class=\"plain\">Promise((resolve, reject) =&gt; {<\/code><\/div>\n<div class=\"line number6 index5 alt1\" style=\"text-align: left;\"><code class=\"undefined spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">setTimeout(() =&gt; {<\/code><\/div>\n<div class=\"line number7 index6 alt2\" style=\"text-align: left;\"><code class=\"undefined spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">resolve(<\/code><code class=\"string\">\" GeeksforGeeks..\"<\/code><code class=\"plain\">);<\/code><\/div>\n<div class=\"line number8 index7 alt1\" style=\"text-align: left;\"><code class=\"undefined spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">}, \u06f1\u06f0\u06f0\u06f0);<\/code><\/div>\n<div class=\"line number9 index8 alt2\" style=\"text-align: left;\"><code class=\"undefined spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">});<\/code><\/div>\n<div class=\"line number10 index9 alt1\" style=\"text-align: left;\"><code class=\"undefined spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">let combined_promise = <\/code><\/div>\n<div class=\"line number11 index10 alt2\" style=\"text-align: left;\"><code class=\"undefined spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">Promise.all([first_promise, second_promise]);<\/code><\/div>\n<div class=\"line number12 index11 alt1\" style=\"text-align: left;\"><code class=\"undefined spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"keyword\">return<\/code> <code class=\"plain\">combined_promise;<\/code><\/div>\n<div class=\"line number13 index12 alt2\" style=\"text-align: left;\"><code class=\"plain\">}<\/code><\/div>\n<div class=\"line number14 index13 alt1\" style=\"text-align: left;\">\u00a0<\/div>\n<div class=\"line number15 index14 alt2\" style=\"text-align: left;\"><code class=\"plain\">async <\/code><code class=\"keyword\">function<\/code> <code class=\"plain\">display() {<\/code><\/div>\n<div class=\"line number16 index15 alt1\" style=\"text-align: left;\"><code class=\"undefined spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">let data = await asynchronous_operational_method();<\/code><\/div>\n<div class=\"line number17 index16 alt2\" style=\"text-align: left;\"><code class=\"undefined spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain\">console.log(data);<\/code><\/div>\n<div class=\"line number18 index17 alt1\" style=\"text-align: left;\"><code class=\"plain\">}<\/code><\/div>\n<div class=\"line number19 index18 alt2\" style=\"text-align: left;\">\u00a0<\/div>\n<div class=\"line number20 index19 alt1\" style=\"text-align: left;\"><code class=\"plain\">display();<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u062e\u0631\u0648\u062c\u06cc:<\/p>\n<pre>[ 'Hello', ' GeeksforGeeks..' ]<\/pre>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0645\u062b\u0627\u0644 \u0627\u0628\u062a\u062f\u0627 \u062f\u0648 promise \u0633\u0627\u062e\u062a\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a. \u06cc\u06a9\u06cc \u0627\u0632 \u0622\u0646\u200c\u0647\u0627 \u0628\u0644\u0627\u0641\u0627\u0635\u0644\u0647 \u0645\u0642\u062f\u0627\u0631 Hello \u0631\u0627 \u0628\u0631\u0645\u06cc\u200c\u06af\u0631\u062f\u0627\u0646\u062f \u0648 \u062f\u06cc\u06af\u0631\u06cc \u067e\u0633 \u0627\u0632 \u06cc\u06a9 \u062b\u0627\u0646\u06cc\u0647 \u0645\u0642\u062f\u0627\u0631 GeeksforGeeks&#8230;\u200e \u0633\u067e\u0633\u060c \u0645\u062a\u062f Promise.all()\u200e \u0647\u0631\u062f\u0648 \u067e\u0631\u0627\u0645\u06cc\u0633 \u0631\u0627 \u0628\u0647 \u06cc\u06a9 \u067e\u0631\u0627\u0645\u06cc\u0633 \u0648\u0627\u062d\u062f \u062a\u0628\u062f\u06cc\u0644 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u062a\u0627\u0628\u0639 display()\u200e \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 async \u0638\u0627\u0647\u0631 \u0645\u06cc\u200c\u0634\u0648\u062f \u0648 \u062d\u0627\u0648\u06cc \u0639\u0645\u0644\u06cc\u0627\u062a asynchronous \u0627\u0633\u062a. \u062f\u0631 \u0642\u062f\u0645 \u0628\u0639\u062f\u06cc\u060c \u06a9\u0644\u06cc\u062f\u0648\u0627\u0698\u0647 await \u0627\u062c\u0631\u0627\u06cc \u0639\u0645\u0644\u06cc\u0627\u062a \u0631\u0627 \u0645\u062a\u0648\u0642\u0641 \u0645\u06cc\u200c\u06a9\u0646\u062f \u062a\u0627 combined_promise (\u062f\u0648 \u0648\u0639\u062f\u0647\u200c\u0627\u06cc \u06a9\u0647 \u0628\u0647 \u06cc\u06a9 \u0648\u0627\u062d\u062f \u062a\u0628\u062f\u06cc\u0644 \u0634\u062f\u0647 \u0628\u0648\u062f\u0646\u062f) \u062d\u0644 \u0634\u0648\u062f. \u062f\u0631 \u0646\u0647\u0627\u06cc\u062a\u060c \u0622\u0631\u0627\u06cc\u0647\u200c\u0627\u06cc \u0627\u0632 \u067e\u0631\u0627\u0645\u06cc\u0633\u200c\u0647\u0627\u06cc \u0648\u0627\u062d\u062f \u062f\u0631 \u06a9\u0646\u0633\u0648\u0644 \u0646\u0645\u0627\u06cc\u0634 \u062f\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f.<\/p>\n<p>\u067e\u06cc\u0634\u0646\u0647\u0627\u062f \u0645\u0637\u0627\u0644\u0639\u0647: <a href=\"https:\/\/maktabkhooneh.org\/mag\/var-in-javascript\/\">\u0622\u0645\u0648\u0632\u0634 Var \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u0647 \u0632\u0628\u0627\u0646 \u0633\u0627\u062f\u0647<\/a><\/p>\n<h2>\u0645\u062a\u062f\u0647\u0627\u06cc \u0645\u062f\u06cc\u0631\u06cc\u062a \u0648\u0639\u062f\u0647 \u06cc\u0627 \u067e\u0631\u0627\u0645\u06cc\u0633 \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a<\/h2>\n<p>\u0645\u062a\u062f\u0647\u0627\u06cc \u06a9\u0646\u062a\u0631\u0644\u200c\u06a9\u0646\u0646\u062f\u0647 \u0648\u0639\u062f\u0647 \u0627\u0628\u0632\u0627\u0631\u06cc \u0636\u0631\u0648\u0631\u06cc \u0628\u0631\u0627\u06cc \u0628\u0631\u0642\u0631\u0627\u0631\u06cc \u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u06cc\u0646 \u062a\u0648\u0627\u0628\u0639 \u0627\u062c\u0631\u0627\u06cc\u06cc \u0648 \u0645\u0635\u0631\u0641\u200c\u06a9\u0646\u0646\u062f\u0647 \u0647\u0633\u062a\u0646\u062f. \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0627\u06cc\u0646 \u0645\u062a\u062f\u0647\u0627 \u0627\u0632 \u0647\u0645\u06af\u0627\u0645\u200c\u0633\u0627\u0632\u06cc \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u06cc\u06a9 \u067e\u0631\u0627\u0645\u06cc\u0633 \u062d\u0644 \u06cc\u0627 \u0631\u062f \u0645\u06cc\u200c\u0634\u0648\u062f\u060c \u0627\u0637\u0645\u06cc\u0646\u0627\u0646 \u062d\u0627\u0635\u0644 \u062e\u0648\u0627\u0647\u062f \u0634\u062f. \u0645\u062a\u062f\u0647\u0627\u06cc \u0645\u0630\u06a9\u0648\u0631 \u06a9\u0646\u062a\u0631\u0644\u200c\u06a9\u0646\u0646\u062f\u0647 \u0639\u0645\u0644\u06cc\u0627\u062a \u063a\u06cc\u0631\u0647\u0645\u0632\u0645\u0627\u0646 \u0647\u0633\u062a\u0646\u062f \u06a9\u0647 \u0628\u0627 \u06a9\u067e\u0633\u0648\u0644\u0647 \u06a9\u0631\u062f\u0646 \u062f\u0627\u062f\u0647\u200c\u0647\u0627 \u062f\u0631 \u0634\u06cc \u0628\u0647 \u062c\u0627\u06cc \u0628\u0631\u06af\u0631\u062f\u0627\u0646\u062f\u0646 \u0646\u0648\u0639\u06cc \u0645\u0642\u062f\u0627\u0631\u060c \u0627\u06cc\u0646 \u0641\u0631\u0627\u06cc\u0646\u062f \u0631\u0627 \u0622\u0633\u0627\u0646 \u062e\u0648\u0627\u0647\u0646\u062f \u06a9\u0631\u062f.<\/p>\n<div style=\"background-color: #fffceb; padding: 0px 8px; align-items: flex-start; border: 1px solid #ffd81a; border-radius: 4px; box-shadow: rgba(255, 216, 26, 0.16) 0px 8px 17px 0px, rgba(255, 216, 26, 0.16) 0px 6px 20px 0px; display: flex; flex-flow: row wrap; justify-content: space-around; margin: 0px; overflow: hidden; position: relative; transition: border 0.25s ease 0s, box-shadow 0.25s ease 0s, background-color 0.2s ease 0s; flex-direction: row; box-sizing: border-box;\">\n<div style=\"width: 16%; overflow: hidden; border: 0px solid #e5e7eb; box-sizing: border-box;\"><img decoding=\"async\" style=\"--smush-placeholder-width: 876px; --smush-placeholder-aspect-ratio: 876\/539;border-radius: 4px; width: 100%; min-height: 90px; transition: transform 0.25s ease 0s; margin: 0px; height: auto; max-width: 100%; display: block; vertical-align: middle; box-sizing: border-box;\" data-src=\"https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2019\/07\/Advantages-of-ReactJS.png\" alt=\"\" title=\"\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\"><\/div>\n<div style=\"padding: 12px 16px 0px; position: relative; width: 65%; display: flex; flex: 1 1 auto; flex-direction: column; gap: 8px; border: 0px solid #e5e7eb; box-sizing: border-box;\">\n<div id=\"ad-title\" style=\"color: #0054ad; font-size: 16px; transition: color 0.2s ease-in-out 0s; align-items: center; display: flex; font-weight: 600; gap: 8px; line-height: 28px; border: 0px solid #e5e7eb; box-sizing: border-box;\">\u062f\u0648\u0631\u0647 \u062c\u0627\u0645\u0639 \u0622\u0645\u0648\u0632\u0634 Reactjs<\/div>\n<\/div>\n<div style=\"bottom: 12px; left: 0px; position: absolute; margin-left: 12px; border: 0px solid #e5e7eb; box-sizing: border-box;\"><a href=\"https:\/\/maktabkhooneh.org\/course\/%D8%A2%D9%85%D9%88%D8%B2%D8%B4-%D9%81%D8%B1%DB%8C%D9%85%D9%88%D8%B1%DA%A9-reactjs-mk401\/\" type=\"button\"> <span class=\"clickable-link\" style=\"box-shadow: rgba(0, 196, 154, 0.64) 0px 5px 8px -1px; background-color: #00c49a; width: 132px; border-radius: 6px; color: #ffffff; display: block; font-size: 14px; font-weight: bold; line-height: 23.8px; margin: 12px auto 0px; padding: 6px; text-align: center; transition: background-color 0.2s ease-in-out 0s, transform 0.2s ease-in-out 0s, box-shadow 0.2s ease-in-out 0s; border: 0px solid #e5e7eb; box-sizing: border-box;\">\u06a9\u0644\u06cc\u06a9 \u06a9\u0646\u06cc\u062f<\/span><\/a><\/div>\n<\/div>\n<p>\u062f\u0631 \u0627\u062f\u0627\u0645\u0647 \u0628\u0627 \u0627\u06cc\u0646 \u0645\u062a\u062f\u0647\u0627 \u0622\u0634\u0646\u0627 \u062e\u0648\u0627\u0647\u06cc\u0645 \u0634\u062f:<\/p>\n<ul>\n<li>.then()\u200e: \u0627\u06cc\u0646 \u0645\u062a\u062f \u0628\u0647 \u0634\u0645\u0627 \u0627\u062c\u0627\u0632\u0647 \u0645\u06cc\u200c\u062f\u0647\u062f \u062a\u0627 \u0645\u0634\u062e\u0635 \u06a9\u0646\u06cc\u062f \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u0648\u0639\u062f\u0647 \u0628\u0627 \u0645\u0648\u0641\u0642\u06cc\u062a \u062d\u0644 \u0634\u062f\u060c \u0686\u0647 \u0627\u0642\u062f\u0627\u0645\u06cc \u0628\u0627\u06cc\u062f \u0635\u0648\u0631\u062a \u0628\u06af\u06cc\u0631\u062f. \u0645\u062a\u062f .then()\u200e \u0646\u0648\u0639\u06cc \u062a\u0627\u0628\u0639 callback \u0628\u0631\u0627\u06cc \u0631\u0633\u06cc\u062f\u06af\u06cc \u0628\u0647 \u0645\u0642\u062f\u0627\u0631\u06cc \u06a9\u0647 \u0628\u0627 \u0645\u0648\u0641\u0642\u06cc\u062a \u062d\u0644 \u0634\u062f\u0647 \u0628\u0631\u0645\u06cc\u200c\u06af\u0631\u062f\u0627\u0646\u062f. \u06a9\u0627\u0631\u0628\u0631 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u067e\u0633 \u0627\u0632 \u062a\u062d\u0642\u0642 \u0648\u0639\u062f\u0647\u060c \u0627\u062c\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u0627\u062f\u0627\u0645\u0647 \u062f\u0647\u062f.<\/li>\n<li>.catch: \u0645\u062a\u062f \u0628\u0639\u062f\u06cc \u06a9\u0647 \u0628\u0627\u06cc\u062f \u062f\u0631 Async \u0648 Await \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u0634\u0646\u0627\u0633\u06cc\u062f\u060c .catch \u0627\u0633\u062a. \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u06cc\u06a9 \u067e\u0631\u0627\u0645\u06cc\u0633 \u0628\u0627 \u062e\u0637\u0627 \u0645\u0648\u0627\u062c\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f\u060c \u0627\u06cc\u0646 \u0645\u062a\u062f \u0628\u0647 \u06a9\u0627\u0631\u0628\u0631 \u0627\u0645\u06a9\u0627\u0646 \u0645\u06cc\u200c\u062f\u0647\u062f \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0631\u0627\u0647\u0628\u0631\u062f\u0647\u0627\u06cc \u0645\u062f\u06cc\u0631\u06cc\u062a \u062e\u0637\u0627 \u0648 \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u0628\u0647 \u062a\u0648\u0627\u0628\u0639 \u0631\u062f \u06cc\u0627 rejection \u0631\u0633\u06cc\u062f\u06af\u06cc \u06a9\u0646\u062f.<\/li>\n<li>.finally()\u200e: \u0627\u06cc\u0646 \u0645\u062a\u062f \u0628\u0631\u0627\u06cc \u062a\u0639\u06cc\u06cc\u0646 \u0627\u0642\u062f\u0627\u0645\u0627\u062a\u06cc \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0635\u0631\u0641\u200c\u0646\u0638\u0631 \u0627\u0632 \u0627\u06cc\u0646\u06a9\u0647 \u0648\u0639\u062f\u0647 \u062d\u0644 \u06cc\u0627 \u0631\u062f \u0634\u062f\u0647 \u0627\u0633\u062a\u060c \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u06af\u06cc\u0631\u062f. \u0628\u0647\u200c\u0637\u0648\u0631 \u0645\u0639\u0645\u0648\u0644 \u0627\u0632 \u0627\u06cc\u0646 \u0645\u062a\u062f \u0628\u0631\u0627\u06cc \u0627\u0646\u062c\u0627\u0645 \u067e\u0627\u06a9\u0633\u0627\u0632\u06cc \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0628\u062f\u0648\u0646 \u062a\u0648\u062c\u0647 \u0628\u0647 \u0646\u062a\u06cc\u062c\u0647 \u0648\u0639\u062f\u0647 \u0635\u0648\u0631\u062a \u0628\u06af\u06cc\u0631\u062f\u060c \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062e\u0648\u0627\u0647\u062f \u0634\u062f.<\/li>\n<li>.all()\u200e: \u0648\u0638\u06cc\u0641\u0647 \u0627\u06cc\u0646 \u0645\u062a\u062f \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0648\u0639\u062f\u0647 \u0648\u0627\u062d\u062f \u0627\u0633\u062a. \u0627\u06cc\u0646 \u0648\u0639\u062f\u0647 \u0641\u0642\u0637 \u0632\u0645\u0627\u0646\u06cc \u062d\u0644 \u0645\u06cc\u200c\u0634\u0648\u062f \u06a9\u0647 \u062a\u0645\u0627\u0645 \u067e\u0631\u0627\u0645\u06cc\u0633\u200c\u0647\u0627\u06cc \u0622\u0631\u0627\u06cc\u0647\u200c\u0627\u06cc \u062e\u0627\u0635 \u0628\u0627 \u0645\u0648\u0641\u0642\u06cc\u062a \u0627\u0646\u062c\u0627\u0645 \u0634\u062f\u0647 \u0628\u0627\u0634\u0646\u062f. \u062f\u0631\u0648\u0627\u0642\u0639\u060c \u0627\u06cc\u0646 \u0645\u062a\u062f \u0632\u0645\u0627\u0646\u06cc \u0645\u0641\u06cc\u062f \u0627\u0633\u062a \u06a9\u0647 \u067e\u06cc\u0634 \u0627\u0632 \u0627\u062f\u0627\u0645\u0647 \u0627\u062c\u0631\u0627 \u0628\u0627\u06cc\u062f \u0645\u0646\u062a\u0638\u0631 \u0628\u0645\u0627\u0646\u06cc\u0645 \u062a\u0627 \u0686\u0646\u062f \u0639\u0645\u0644 \u063a\u06cc\u0631\u0647\u0645\u06af\u0627\u0645 \u062a\u06a9\u0645\u06cc\u0644 \u0634\u0648\u0646\u062f.<\/li>\n<li>.race()\u200e: \u0627\u06cc\u0646 \u0645\u062a\u062f \u06cc\u06a9 \u0646\u0648\u0639 \u0648\u0639\u062f\u0647 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u06a9\u0646\u062f \u0648 \u0628\u0647\u200c\u0645\u062d\u0636 \u062d\u0644 \u06cc\u0627 \u0631\u062f \u0634\u062f\u0646\u060c \u06cc\u06a9\u06cc \u0627\u0632 \u0648\u0639\u062f\u0647\u200c\u0647\u0627\u06cc \u0622\u0631\u0627\u06cc\u0647 \u062d\u0644 \u06cc\u0627 \u0631\u062f \u062e\u0648\u0627\u0647\u062f \u0634\u062f. \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u06a9\u0627\u0631\u0628\u0631 \u0628\u062e\u0648\u0627\u0647\u062f \u0628\u0644\u0627\u0641\u0627\u0635\u0644\u0647 \u0628\u0639\u062f \u0627\u0632 \u062a\u06a9\u0645\u06cc\u0644 \u0647\u0631 \u06cc\u06a9 \u0627\u0632 \u0639\u0645\u0644\u06cc\u0627\u062a\u200c\u0647\u0627\u06cc \u063a\u06cc\u0631\u0647\u0645\u06af\u0627\u0645\u060c \u0627\u062c\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0627\u062f\u0627\u0645\u0647 \u067e\u06cc\u062f\u0627 \u06a9\u0646\u062f \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u06af\u06cc\u0631\u062f.<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-39560 size-full lazyload\" data-src=\"https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2024\/05\/word-image-39548-12.jpeg\" alt=\"\u0645\u062a\u062f\u0647\u0627\u06cc \u0645\u062f\u06cc\u0631\u06cc\u062a \u0648\u0639\u062f\u0647 \u06cc\u0627 \u067e\u0631\u0627\u0645\u06cc\u0633 \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a\" width=\"780\" height=\"470\" title=\"\" data-srcset=\"https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2024\/05\/word-image-39548-12.jpeg 780w, https:\/\/maktabkhooneh.org\/mag\/wp-content\/smush-webp\/2024\/05\/word-image-39548-12-300x181.jpeg.webp 300w, https:\/\/maktabkhooneh.org\/mag\/wp-content\/smush-webp\/2024\/05\/word-image-39548-12-768x463.jpeg.webp 768w\" data-sizes=\"(max-width: 780px) 100vw, 780px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 780px; --smush-placeholder-aspect-ratio: 780\/470;\" \/><\/p>\n<p><strong>\u0646\u06a9\u062a\u0647! <\/strong>\u0627\u06cc\u0646 \u0645\u062a\u062f\u0647\u0627\u06cc \u06a9\u0646\u062a\u0631\u0644\u200c\u06a9\u0646\u0646\u062f\u0647 \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a\u0627\u0631\u062f\u0647\u06cc \u0648 \u0645\u062f\u06cc\u0631\u06cc\u062a \u06a9\u062f\u0647\u0627\u06cc \u063a\u06cc\u0631\u0647\u0645\u06af\u0627\u0645 \u06a9\u0627\u0631\u0627\u06cc\u06cc \u062f\u0627\u0631\u0646\u062f \u0648 \u0628\u0647 \u0634\u0645\u0627 \u0627\u062c\u0627\u0632\u0647 \u0645\u06cc\u200c\u062f\u0647\u0646\u062f \u062a\u0627 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627\u06cc\u06cc \u0633\u0627\u0632\u0645\u0627\u0646\u200c\u06cc\u0627\u0641\u062a\u0647\u200c\u062a\u0631\u060c \u067e\u0627\u0633\u062e\u06af\u0648\u062a\u0631 \u0648 \u06a9\u0627\u0631\u0622\u0645\u062f\u062a\u0631 \u0628\u0646\u0648\u06cc\u0633\u06cc\u062f.<\/p>\n<p>\u067e\u06cc\u0634\u0646\u0647\u0627\u062f \u0645\u0637\u0627\u0644\u0639\u0647: <a class=\"post-title the-subtitle\" href=\"https:\/\/maktabkhooneh.org\/mag\/const-in-javascript\/\">Const \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a: \u0646\u06af\u0647\u0628\u0627\u0646 \u0645\u0642\u0627\u062f\u06cc\u0631 \u0634\u0645\u0627 \u062f\u0631 \u062f\u0646\u06cc\u0627\u06cc \u0645\u062a\u063a\u06cc\u0631<\/a><\/p>\n<h2>\u0633\u062e\u0646 \u067e\u0627\u06cc\u0627\u0646\u06cc:<\/h2>\n<p>Async \u0648 Await \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a\u060c \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u0642\u062f\u0631\u062a\u0645\u0646\u062f\u06cc \u0647\u0633\u062a\u0646\u062f \u06a9\u0647 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u0646\u0627\u0647\u0645\u06af\u0627\u0645 \u0631\u0627 \u0633\u0627\u062f\u0647\u200c\u062a\u0631 \u0648 \u062e\u0648\u0627\u0646\u0627\u062a\u0631 \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f. \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 async\u060c \u062a\u0648\u0627\u0628\u0639 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u0628\u0647 \u0635\u0648\u0631\u062a \u0646\u0627\u0647\u0645\u06af\u0627\u0645 \u0639\u0645\u0644 \u06a9\u0646\u0646\u062f \u0648 \u0647\u0645\u06cc\u0634\u0647 \u06cc\u06a9 Promise \u0628\u0631\u0645\u06cc\u200c\u06af\u0631\u062f\u0627\u0646\u0646\u062f. Await \u0628\u0647 \u06a9\u062f \u0627\u062c\u0627\u0632\u0647 \u0645\u06cc\u200c\u062f\u0647\u062f \u062a\u0627 \u0645\u0646\u062a\u0638\u0631 \u062a\u06a9\u0645\u06cc\u0644 \u06cc\u06a9 Promise \u0628\u0645\u0627\u0646\u062f\u060c \u0628\u062f\u0648\u0646 \u0622\u0646\u06a9\u0647 \u0645\u0633\u062f\u0648\u062f \u0634\u0648\u062f.<\/p>\n<p>\u0627\u06cc\u0646 \u062a\u06a9\u0646\u06cc\u06a9\u200c\u0647\u0627 \u0628\u0647 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627 \u0627\u0645\u06a9\u0627\u0646 \u0645\u06cc\u200c\u062f\u0647\u0646\u062f \u06a9\u0647 \u0648\u0638\u0627\u06cc\u0641 \u0645\u062a\u0639\u062f\u062f \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0647\u0645\u0632\u0645\u0627\u0646 \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u0646\u062f\u060c \u0645\u0634\u0627\u0628\u0647 \u06cc\u06a9 \u0628\u0627\u0631\u06cc\u0633\u062a\u0627 \u06a9\u0647 \u0686\u0646\u062f\u06cc\u0646 \u0642\u0647\u0648\u0647 \u0631\u0627 \u0628\u0647 \u0637\u0648\u0631 \u0647\u0645\u0632\u0645\u0627\u0646 \u0622\u0645\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f \u06a9\u0647 \u0627\u06cc\u0646 \u0627\u0645\u0631 \u0633\u0631\u0639\u062a \u0648 \u06a9\u0627\u0631\u0627\u06cc\u06cc \u0631\u0627 \u0628\u0647\u0628\u0648\u062f \u0645\u06cc\u200c\u0628\u062e\u0634\u062f. \u062f\u0631 \u0646\u062a\u06cc\u062c\u0647\u060c Async \u0648 Await \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc \u0627\u0633\u0627\u0633\u06cc \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0647\u0633\u062a\u0646\u062f \u06a9\u0647 \u0628\u0647 \u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u06a9\u0645\u06a9 \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f \u062a\u0627 \u06a9\u062f\u0647\u0627\u06cc \u0646\u0627\u0647\u0645\u06af\u0627\u0645 \u0631\u0627 \u0628\u0647 \u0634\u06a9\u0644\u06cc \u0645\u0624\u062b\u0631\u062a\u0631 \u0645\u062f\u06cc\u0631\u06cc\u062a \u06a9\u0646\u0646\u062f.<\/p>\n<h2>\u0622\u0645\u0648\u0632\u0634 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u062f\u0631 \u0645\u06a9\u062a\u0628 \u062e\u0648\u0646\u0647<\/h2>\n<p>\u062f\u0646\u06cc\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u0628\u0632\u0631\u06af\u200c\u062a\u0631 \u0627\u0632 \u0622\u0646 \u0686\u06cc\u0632\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0641\u06a9\u0631\u0634 \u0631\u0627 \u06a9\u0646\u06cc\u062f! \u062f\u0631 \u0627\u06cc\u0646 \u062f\u0646\u06cc\u0627\u06cc \u06af\u0633\u062a\u0631\u062f\u0647 \u0632\u0628\u0627\u0646\u200c\u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641\u06cc \u0631\u0648\u06cc \u06a9\u0627\u0631 \u0622\u0645\u062f\u0647\u200c\u0627\u0646\u062f \u06a9\u0647 \u0628\u062f\u0648\u0646 \u0634\u06a9 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u06cc\u06a9\u06cc \u0627\u0632 \u067e\u0631\u0686\u0645\u062f\u0627\u0631\u0627\u0646 \u0627\u0633\u062a. \u0686\u0631\u0627\u06a9\u0647 \u06a9\u0627\u0631\u0628\u0631\u062f\u0647\u0627\u06cc \u0641\u0631\u0627\u0648\u0627\u0646\u06cc \u062f\u0627\u0631\u062f \u0648 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0628\u0627 \u06a9\u0645\u06a9 \u0627\u06cc\u0646 \u0632\u0628\u0627\u0646 \u0686\u0627\u0644\u0634\u200c\u0628\u0631\u0627\u0646\u06af\u06cc\u0632 \u0648 \u0634\u06cc\u0631\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641\u06cc \u062f\u0631 \u0645\u062d\u06cc\u0637 \u0648\u0628\u060c \u062f\u0633\u062a\u06a9\u062a\u0627\u067e\u060c \u0645\u0648\u0628\u0627\u06cc\u0644\u060c \u0628\u0627\u0632\u06cc \u0648 \u063a\u06cc\u0631\u0647 \u0646\u0648\u0634\u062a. \u062c\u0627\u0648\u0627\u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u067e\u064f\u0631 \u0627\u0632 \u0645\u0641\u0627\u0647\u06cc\u0645 \u06a9\u0644\u06cc\u062f\u06cc \u0648 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0647\u0631 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u06a9\u0647 \u0628\u0627 \u0627\u06cc\u0646 \u0632\u0628\u0627\u0646 \u06a9\u0627\u0631 \u0645\u06cc\u200c\u06a9\u0646\u062f \u0628\u0627\u06cc\u062f \u0645\u0647\u0645\u200c\u062a\u0631\u06cc\u0646\u0650 \u0622\u0646\u200c\u0647\u0627 \u0631\u0627 \u0628\u0634\u0646\u0627\u0633\u062f. \u06cc\u06a9\u06cc \u0627\u0632 \u0627\u06cc\u0646 \u0645\u0641\u0627\u0647\u06cc\u0645 Async \u0648 Await \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0627\u0633\u062a.<\/p>\n<div style=\"background-color: #fffceb; padding: 0px 8px; align-items: flex-start; border: 1px solid #ffd81a; border-radius: 4px; box-shadow: rgba(255, 216, 26, 0.16) 0px 8px 17px 0px, rgba(255, 216, 26, 0.16) 0px 6px 20px 0px; display: flex; flex-flow: row wrap; justify-content: space-around; margin: 0px; overflow: hidden; position: relative; transition: border 0.25s ease 0s, box-shadow 0.25s ease 0s, background-color 0.2s ease 0s; flex-direction: row; box-sizing: border-box;\">\n<div style=\"width: 16%; overflow: hidden; border: 0px solid #e5e7eb; box-sizing: border-box;\"><img decoding=\"async\" style=\"--smush-placeholder-width: 1000px; --smush-placeholder-aspect-ratio: 1000\/560;border-radius: 4px; width: 100%; min-height: 90px; transition: transform 0.25s ease 0s; margin: 0px; height: auto; max-width: 100%; display: block; vertical-align: middle; box-sizing: border-box;\" data-src=\"https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2020\/08\/learn-javascript-programming-language.jpg\" alt=\"\" title=\"\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\"><\/div>\n<div style=\"padding: 12px 16px 0px; position: relative; width: 65%; display: flex; flex: 1 1 auto; flex-direction: column; gap: 8px; border: 0px solid #e5e7eb; box-sizing: border-box;\">\n<div id=\"ad-title\" style=\"color: #0054ad; font-size: 16px; transition: color 0.2s ease-in-out 0s; align-items: center; display: flex; font-weight: 600; gap: 8px; line-height: 28px; border: 0px solid #e5e7eb; box-sizing: border-box;\">\u062f\u0648\u0631\u0647 \u062c\u0627\u0645\u0639 \u0622\u0645\u0648\u0632\u0634 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u0647 \u0635\u0648\u0631\u062a \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc<\/div>\n<\/div>\n<div style=\"bottom: 12px; left: 0px; position: absolute; margin-left: 12px; border: 0px solid #e5e7eb; box-sizing: border-box;\"><a href=\"https:\/\/maktabkhooneh.org\/course\/%D8%A2%D9%85%D9%88%D8%B2%D8%B4-%D8%AC%D8%A7%D9%88%D8%A7-%D8%A7%D8%B3%DA%A9%D8%B1%DB%8C%D9%BE%D8%AA-mk1122\/\" type=\"button\"> <span class=\"clickable-link\" style=\"box-shadow: rgba(0, 196, 154, 0.64) 0px 5px 8px -1px; background-color: #00c49a; width: 132px; border-radius: 6px; color: #ffffff; display: block; font-size: 14px; font-weight: bold; line-height: 23.8px; margin: 12px auto 0px; padding: 6px; text-align: center; transition: background-color 0.2s ease-in-out 0s, transform 0.2s ease-in-out 0s, box-shadow 0.2s ease-in-out 0s; border: 0px solid #e5e7eb; box-sizing: border-box;\">\u06a9\u0644\u06cc\u06a9 \u06a9\u0646\u06cc\u062f<\/span><\/a><\/div>\n<\/div>\n<p>\u0627\u06af\u0631 \u0639\u0644\u0627\u0642\u0645\u0646\u062f \u0628\u0647 \u06a9\u0633\u0628 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0628\u06cc\u0634\u062a\u0631 \u067e\u06cc\u0631\u0627\u0645\u0648\u0646 \u0632\u0628\u0627\u0646 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0648 \u0647\u0645\u0686\u0646\u06cc\u0646 \u062a\u06a9\u0645\u06cc\u0644 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u062e\u0648\u062f \u062f\u0631\u0628\u0627\u0631\u0647 \u0622\u0645\u0648\u0632\u0634 async await \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0648 \u063a\u06cc\u0631\u0647 \u0647\u0633\u062a\u06cc\u062f\u060c \u0627\u0632 \u0634\u0645\u0627 \u062f\u0639\u0648\u062a \u0645\u06cc\u200c\u0634\u0648\u062f \u0633\u0631\u06cc \u0628\u0647 \u062f\u0648\u0631\u0647\u200c\u0647\u0627\u06cc <a href=\"https:\/\/maktabkhooneh.org\/learn\/java-script\/\">\u0622\u0645\u0648\u0632\u0634 Javascript <\/a>\u0648 <a href=\"https:\/\/maktabkhooneh.org\/learn\/programming\">\u0622\u0645\u0648\u0632\u0634 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc<\/a> \u062f\u0631 \u0645\u06a9\u062a\u0628 \u062e\u0648\u0646\u0647 \u0628\u0632\u0646\u06cc\u062f.<\/p>\n<p>\u0631\u0641\u0631\u0646\u0633: <a href=\"https:\/\/www.geeksforgeeks.org\/javascript\/async-await-function-in-javascript\/\" rel=\"nofollow noopener\" target=\"_blank\">geeksforgeeks<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Async \u0648 Await \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u06cc\u06a9 \u0648\u06cc\u0698\u06af\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0628\u0647 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633 \u0627\u06cc\u0646 \u0627\u0645\u06a9\u0627\u0646 \u0631\u0627 \u0645\u06cc\u200c\u062f\u0647\u062f \u062a\u0627 \u06a9\u062f \u0646\u0627\u0647\u0645\u06af\u0627\u0645 (Asynchronous) \u0628\u0647 \u0634\u06cc\u0648\u0647\u200c\u0627\u06cc \u0628\u0647\u062a\u0631 \u06a9\u0627\u0631 \u06a9\u0646\u062f. \u062f\u0631\u0648\u0627\u0642\u0639\u060c Async \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0627\u06cc\u0646 \u0627\u0645\u06a9\u0627\u0646 \u0631\u0627 \u0628\u0647 \u0634\u0645\u0627 \u0645\u06cc\u200c\u062f\u0647\u062f \u06a9\u0647 \u06a9\u062f\u0647\u0627\u06cc \u0646\u0627\u0647\u0645\u06af\u0627\u0645 \u0631\u0627 \u062e\u06cc\u0644\u06cc \u0631\u0627\u062d\u062a\u200c\u062a\u0631 \u0628\u0646\u0648\u06cc\u0633\u06cc\u062f \u0648 \u0622\u0646\u200c\u0647\u0627 \u0631\u0627 \u062f\u0631\u06a9 \u06a9\u0646\u06cc\u062f. \u062a\u0648\u0627\u0628\u0639 Async \u0647\u0645\u06cc\u0634\u0647 \u06cc\u06a9 Promise \u0628\u0631\u0645\u06cc\u200c\u06af\u0631\u062f\u0627\u0646\u0646\u062f. \u06a9\u0644\u06cc\u062f\u0648\u0627\u0698\u0647 [&hellip;]<\/p>\n","protected":false},"author":28,"featured_media":39561,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,30,12],"tags":[],"class_list":["post-39548","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming-and-it-training","category-web-programming-articles","category-java-script-articles"],"_links":{"self":[{"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/posts\/39548","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/comments?post=39548"}],"version-history":[{"count":3,"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/posts\/39548\/revisions"}],"predecessor-version":[{"id":65581,"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/posts\/39548\/revisions\/65581"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/media\/39561"}],"wp:attachment":[{"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/media?parent=39548"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/categories?post=39548"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/tags?post=39548"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}