Demo entry 6757095

js test

   

Submitted by qbbr on Aug 07, 2018 at 09:39
Language: JavaScript. Code size: 376 Bytes.

// С какими libs/frameworks работали?
// В чём разница между "const" и "let" и "var"

const Animal = {
    sound: '123',

    say: function() {
        return this.sound;
    }
};

const Cat = {
    __proto__: Animal
};

console.log(Animal.say());
console.log(Cat.say());

Cat.sound = 'Мур-Мур ...';

console.log(Animal.say());
console.log(Cat.say());

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).