Answers for "oop js is"

3

oop js is

function Person(name) {
  this.name = name;
  this.greeting = function() {
    alert('Hi! I\'m ' + this.name + '.');
  };
}
Posted by: Guest on July-30-2020
4

is javascript object oriented

var js = new JavaScript();
js.isObjectOrientated = true;
Posted by: Guest on April-13-2020
0

oop javascript

function DogObject(name, age) {
    let dog = Object.create(constructorObject);
    dog.name = name;
    dog.age = age;
    return dog;
}
let constructorObject = {
    speak: function(){
        return "I am a dog"
    }
}
let bingo = DogObject("Bingo", 54);
console.log(bingo);
Posted by: Guest on February-17-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language