CHALLENGE
function Shape() {}
function Circle(radius) {
this.radius = radius;
}
Circle.prototype = Object.create(Shape.prototype);
Circle.prototype.constructor = Circle;
const shape = new Shape();
const circle = new Circle(5);
console.log(circle instanceof Circle);
console.log(circle instanceof Shape);
console.log(shape instanceof Circle);
console.log(shape instanceof Shape);
❤9👍3🔥1
What is the output?
Anonymous Quiz
42%
true, true, false, true
21%
false, false, true, true
25%
true, false, true, false
12%
true, true, true, true
👍8❤4🤩4🤣3🔥1
ArmenVardanyan
Author of "Modern Angular"
Google DevExpert for Angular
Please open Telegram to view this post
VIEW IN TELEGRAM
❤3👍3🔥2🤣2🤔1🤩1
CHALLENGE
function Animal() {}
function Dog() {}
Dog.prototype = Object.create(Animal.prototype);
const rover = new Dog();
console.log(rover.hasOwnProperty('constructor'));
👍5❤2🔥2🤣2
🤔7🤣4❤3👍3🔥1
Less shell-oriented than zx, execa focuses on making executing external commands secure, cross-platform, and easy to debug. v9 lets you make commands iterable so you can process their output on the fly, map/filter both input and output, pipe multiple commands, and more. GitHub repo.
EHMICKEY, SORHUS, ET AL.
Please open Telegram to view this post
VIEW IN TELEGRAM
👍5❤2🔥2🤣2🤩1
CHALLENGE
function Shape() {}
function Circle(radius) {}
Circle.prototype = Object.create(Shape.prototype);
const shape = new Shape();
console.log(shape instanceof Circle);
🤣6❤3🔥3👍1
👍13🤔10🤩4❤3🤣2🔥1
To continue delivering more exciting stories, we're kindly asking telegram premium users to help us take things to the next level.
https://t.iss.one/javascript?boost
https://t.iss.one/javascript?boost
Telegram
JavaScript
Boost this channel to help it unlock additional features.
❤9👍2🔥2🤣1
CHALLENGE
function Animal() {}
const dog = new Animal();
console.log(dog.constructor === Animal);
👍5🔥2❤1
👍13🤔8❤7🤩5🔥1
📄✌️ How to Document Your JavaScript Package
You’ve written some useful code, you want to distribute it.. what next? Useful docs! The Deno team demonstrates the value of JSDoc and writing documentation alongside your usual source code.
THE DENO TEAM
You’ve written some useful code, you want to distribute it.. what next? Useful docs! The Deno team demonstrates the value of JSDoc and writing documentation alongside your usual source code.
THE DENO TEAM
Please open Telegram to view this post
VIEW IN TELEGRAM
❤8👍2🤩2🤔1🤣1
CHALLENGE
var foo = {};
var bar = Object.create(foo);
foo.a = 1;
console.log(bar.a);
❤4🔥2
👍19🤔6🤩5🔥1
A commercial, turn-based strategy game available on the Steam Store, but now with an open sourced engine and tooling. The game is published by Null, an indie game publisher founded by GitHub cofounder Chris Wanstrath.
CHRISTOPH NAKAZAWA
Please open Telegram to view this post
VIEW IN TELEGRAM
👍11❤4🔥1🤩1
CHALLENGE
function Person() {}
var person = new Person();
console.log(person instanceof Person);
console.log(person instanceof Object);
❤5🔥2
👍15❤7🔥4🤩4
It basically loads your code into this site (which you can use directly, if you'd rather not install an extension) where you can tweak settings/theme and export to either a PNG or SVG.
VKRSI / VISUAL STUDIO MARKETPLACE
Please open Telegram to view this post
VIEW IN TELEGRAM
👍7🤔2❤1🔥1
CHALLENGE
function X() {}
X.prototype.getValue = function() {
return this.value;
};
function Y() {
this.value = 42;
}
Y.prototype = Object.create(X.prototype);
Y.prototype.constructor = Y;
var y = new Y();
console.log(y.getValue());
❤8🤔7🔥4👍3🤣3