Skip to content

Instantly share code, notes, and snippets.

const withoutAsyncAwait = (() => {
const getFirstName = new Promise<string>((resolve) => {
resolve('tim')
});
const getLastName = new Promise<string>((resolve) => {
resolve('cook')
});
const displayFullname = new Promise<string>((resolve) => {
let fullname = '';
getFirstName.then((resp: string) => {
020-08-22 17:12:15.229 [INFO ] INFO o.s.b.w.e.t.TomcatWebServer [main] - Tomcat initialized with port(s): 8080 (http)
2020-08-22 17:12:15.331 [INFO ] INFO o.a.c.h.Http11NioProtocol [main] - Initializing ProtocolHandler ["http-nio-8080"]
2020-08-22 17:12:15.333 [INFO ] INFO o.a.c.c.StandardService [main] - Starting service [Tomcat]
2020-08-22 17:12:15.416 [INFO ] INFO o.a.c.c.StandardEngine [main] - Starting Servlet engine: [Apache Tomcat/9.0.29]
2020-08-22 17:12:24.925 [INFO ] INFO o.a.j.s.TldScanner [main] - At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2020-08-22 17:12:25.914 [INFO ] INFO o.a.c.c.C.[.[.[/rd-admin-api] [main] - Initializing Spring embedded WebApplicationContext
2020-08-22 17:12:25.915 [DEBUG] DEBUG o.s.w.c.ContextLoader [main] - Published root WebApplicationContext as Servlet