Jinali Ghogharijinali.hashnode.dev·Mar 28, 2024Dart: Getter & Setter Method | Why do we use getter & setterGetter and setter methods are the class methods used to manipulate the data of the class fields. Getter is used to read or get the data of the class field whereas setter is used to set the data of the class field to some variable. Getter Method in Da...DiscussDartDart
Jinali Ghogharijinali.hashnode.dev·Mar 23, 2024Dart: EncapsulationIn Dart, Encapsulation means hiding data within a library, preventing it from outside factors. It helps you control your program and prevent it from becoming too complicated. Every .dart file is a library. A library is a collection of function and cl...DiscussDartDart
Shikhar Shuklashikhar99.hashnode.dev·Feb 28, 2024Mastering Getter and Setter in JavaScriptJavaScript provides powerful mechanisms for controlling access to object properties through getters and setters. These features allow developers to enforce encapsulation, validate data, and execute custom behavior when accessing or modifying object p...Discuss·72 readsproperties in javascript
Anjanesh LekshminarayananforAlpine JSalpinejs.in·Feb 17, 2024Using getters and setters Part 2This is second part in the series to make use of getters and setters in an AlpineJS object, that converts INR to USD. Well, only a setter has been used here where a function call is made to the setter priceInINR when the textbox of the USD value chan...Discuss·76 readsgetter and setter
Anjanesh LekshminarayananforJavaScriptjavascript.co.in·Oct 18, 2023Importance of using Getters in Vanilla JavaScriptLet's look at an example of why getters (and so are also setters) are so useful. Let's say you have an AJAX call that you're using via fetch to retrieve the value of 1 USD in INR. Say we have a script that gets the content of https://open.er-api.com/...Discuss·66 readsgetter and setter
Anjanesh LekshminarayananforAlpine JSalpinejs.in·Oct 16, 2023Using getters and settersThis is going to be a 3 part series on using getters and setters in AlpineJS. I knew about set and get in JavaScript which are commonly known as setters and getters but I had never used them in a real case scenario until now. I agree, I am pretty lat...Discuss·415 readsJavaScript
shishir srivastavforConcepts of Techshishirslearningjourney.hashnode.dev·Jul 15, 2023Encapsulation OverviewThe literal meaning of the term 'Encapsulation' is encasing like a capsule where data and methods work together as a single unit. It's one of the four pillars of Object orientated programming. We will talk about the other three at later stages. Here,...Discuss·56 readsJava
Tung Phamsignal11.hashnode.dev·Jun 27, 2023Python `getter` & `setter` examplesSource: https://realpython.com/python-getter-setter/ A simple example # employee.py from datetime import date class Employee: def __init__(self, name, birth_date, start_date): self.name = name self.birth_date = birth_date ...Discuss·45 readsoop
Arnab Chatterjeearnabchatterjee20k.hashnode.dev·Feb 28, 2023Implementing getters and setters in real life applications - Using OOPSIntroduction Getters and Setters are one of the most underrated concepts of OOPs. We can use it in our applications to make the logic as well as code readability more clear and also we can make the workflow of the design patterns more verbose. I used...Discuss·123 readsOOPS
{{ MonaCodeLisa }}blog.monacodelisa.com·Jun 14, 2021Setters & Getters in JavaScript and TypeScript - Simple & Code ExamplesSetters and getters are important features of object-oriented programming languages like JavaScript and TypeScript. They provide a way to control access to the properties of an object, ensuring that the values are valid and that the object is in a co...Discuss·38 readsTypeScript / JavaScriptJavaScript