CHALLENGE β
let name = "Alice";
(function() {
let name = "Bob";
console.log(name);
})();
console.log(name);
Please open Telegram to view this post
VIEW IN TELEGRAM
π2π₯1
What is the output?
Anonymous Quiz
57%
"Bob", "Alice"
9%
"Alice", "Alice"
10%
"Bob", "Bob
24%
"Alice", "Bob"
π18β€4π₯4
Give this online tool the name of an npm package and you get a quick βdashboardβ style view of the projectβs main statistics, covering areas like quality scores, commits, open issues, releases, bundle size, and more.
Shrinath Nayak
Please open Telegram to view this post
VIEW IN TELEGRAM
β€3π2π₯2π€©1
CHALLENGE β
const sym1 = Symbol("id");
const sym2 = Symbol("id");
console.log(sym1 === sym2);
Please open Telegram to view this post
VIEW IN TELEGRAM
π3
π€32π€£31β€3π3π₯3
CHALLENGE β
const name = "Alice";
const obj = {
name: "Bob",
getName() {
return this.name;
}
};
console.log(obj.getName.call({ name: "Charlie" }));
Please open Telegram to view this post
VIEW IN TELEGRAM
π11β€2
π₯17β€3π2
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£113β€6π₯6π2π€©1
CHALLENGE β
const arr = [1, 2, 3];
arr[10] = 11;
console.log(arr.length);
Please open Telegram to view this post
VIEW IN TELEGRAM
π6
π€£42π14π₯5
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£84π5β€4π€1
CHALLENGE β
const obj = {
a: 1,
b: 2,
a: 3
};
console.log(obj.a);
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£24π17π€9
π€£92π19β€5π€5π₯3
Please open Telegram to view this post
VIEW IN TELEGRAM
π7π₯3β€2π€©1
CHALLENGE β
console.log([..."hello"]);
Please open Telegram to view this post
VIEW IN TELEGRAM
π18
What is the output?
Anonymous Quiz
51%
["h", "e", "l", "l", "o"]
35%
["hello"]
12%
Error
2%
["h", "ello"]
π€£18π13π€8β€7
CHALLENGE β
Number.prototype[Symbol.iterator] = function*() { yield *['a','b','c'] };
console.log([...1]);
Please open Telegram to view this post
VIEW IN TELEGRAM
π€12β€4π3
π2π€1