How to get dollar and euro exchange rates?

  • 0
    Hello everyone. I'm not very familiar with JS. More with Python. But at the moment I need a simple script to get just two numeric values ​​and write them to variables. The first number is the dollar rate, the second is the euro rate. In Python, this is mega simple and takes a couple of lines with the request library included.
    How do I do this in JS? You need to get the values ​​from here: https://www.cbr-xml-daily.com/daily_json .js
    JavaScript Scarlet Rivas, Apr 27, 2019

  • 2 Answers
  • 0
    You can do this

    In Python, this is mega simple and takes a couple of lines with the request library included.


    In JS, you don't even need to connect anything for this.
    Adrian Lozano

  • 0
    JSON.parse ()

    fetch ()



    P.S. There are many ways. It feels like you haven't even tried to search.
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!