From c729d23cc6c8edad80214ef59301645e0ccbfcc9 Mon Sep 17 00:00:00 2001
From: Sascha Schulz <sschulz@dh-software.de>
Date: Di, 09 Mai 2023 16:05:24 +0200
Subject: [PATCH] remove redundant slide and polish excercise

---
 index.html |   48 +++++++++++++++++++++++++-----------------------
 1 files changed, 25 insertions(+), 23 deletions(-)

diff --git a/index.html b/index.html
index 622ff0d..788f36d 100644
--- a/index.html
+++ b/index.html
@@ -1565,28 +1565,6 @@
 						</pre>
 					</section>
 					<section>
-						Lösung: Callback-Hell oder Pyramide des Todes
-						<pre>
-							<code class="js" data-trim data-line-numbers>
-								setTimeout(function() {
-									console.log("zweiter");
-								
-									setTimeout(function() {
-										console.log("Text A");
-								
-										setTimeout(function() {
-											console.log("Text B");
-										
-											
-										}, 2000);
-									}, 2000);
-								}, 2000);
-								
-								console.log("erster");
-							</code>
-						</pre>
-					</section>
-					<section>
 						Hilfsmittel: Promises
 						<pre>
 							<code class="js" data-trim data-line-numbers>
@@ -1638,7 +1616,31 @@
 						</pre>
 					</section>
 					<section>
-						Aufgabe: Implementiere die Funktion "delay", um die Promise-Kette lauffähig zu bekommen
+						Aufgabe: Implementiere die Funktion "delay"
+						<pre>
+							<code class="js" data-trim data-line-numbers>
+								const delay = function() {
+									// implementieren
+								}
+								
+								console.log("erster");
+								
+								delay(2000)
+									.then(function () {
+										console.log("zweiter");
+								
+										return delay(2000);
+									})
+									.then(function() {
+										console.log("Text A");
+								
+										return delay(2000);
+									})
+									.then(function() {
+										console.log("Text B");
+									})
+							</code>
+						</pre>
 					</section>
 				</section>
 			</div>

--
Gitblit v1.9.3