We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc92a49 commit c726aafCopy full SHA for c726aaf
1 file changed
Interview-Questions/func.js
@@ -34,3 +34,24 @@ increment();
34
increment();
35
36
log();
37
+
38
+// Console sequence output?
39
+function run () {
40
+ const promise = new Promise((resolve) => {
41
+ resolve('promise');
42
+ })
43
44
+ setTimeout(() => {
45
+ console.log('setTimeout');
46
+ });
47
48
+ promise.then(res => console.log(res))
49
50
+ console.log('log');
51
+}
52
53
+run();
54
55
+// How does the Javascript interprets the following code?
56
+console.log(x);
57
+var x = 100;
0 commit comments