In JavaScript, objects, it their simplest form represent collections of keys paired with values. JS also offers a lot of OOP features that we can use to structure and hone our code even more. Here is a little example to being with: var computer = { name: "Intel", cpuCores: 4, webCam: true }; There are … Continue reading OOP in JavaScript
Tag: oop
Object Fundamentals
Object-Oriented Programming (OOP) is based around the notion of objects. This paradigm of programming has gain high popularity in the past decade and certainly is still very valuable among developers. We are going to take a closer look at objects, classes, methods, inheritance, visibility and scope within classes. Once you have a good understanding of … Continue reading Object Fundamentals
Strategy Pattern
Imagine that you need to create a game where a character is able to fight. Character should be able to pick a weapon. Different weapon would preform different action. We need the character to be able to use his fists, a knife, and a gun. Every weapon can have its own set of attributes and … Continue reading Strategy Pattern
