---
title: "Discussion on \"Importance of using Getters in Vanilla JavaScript\" | Hashnode"
description: "Discussion on \"Importance of using Getters in Vanilla JavaScript\". Let's look at an example of why getters (and so are also setters) are so useful.\nLet'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/..."
url: "https://hashnode.com/posts/importance-of-using-getters-in-vanilla-javascript/652f33b709242132a192ee9c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Importance of using Getters in Vanilla JavaScript](https://javascript.co.in/importance-of-using-getters-in-vanilla-javascript?utm_source=hashnode&utm_medium=feed)

Let'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/...

Oct 18, 2023 · 2 min read · javascript.co.in  
Read the article

-   [#getter-and-setter](https://hashnode.com/tag/getter-and-setter)
-   [#getter](https://hashnode.com/tag/getter)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#currency-converter](https://hashnode.com/tag/currency-converter)

## Written by

[Anjanesh Lekshminarayanan](https://hashnode.com/@anjanesh)

@anjanesh · Navi Mumbai, MH

  
[View profile](https://hashnode.com/@anjanesh)

Web UI Engineer

I am a web consultant from Navi Mumbai. Mainly dealt with LAMP stack, now into Django and getting into Laravel and Cloud. Founder of nerul.in and gaali.in

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
