what is object oriented programming in javascript code example
Example 1: oops in javascript
const book = { title: "Hippie", author: "Paulo Coelho", year: "2018"}
Example 2: js oop
let names = {
fname: "Dillion",
lname: "Megida"
}
console.log(names.fname);
console.log(names.hasOwnProperty("mname"));
// Expected Output
// Dillion
// false
Example 3: is javascript object oriented
var js = new JavaScript();
js.isObjectOrientated = true;