Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

212
Views
JSON object declaration is expecting semicolon in my code

I'm a beginner in JavaScript. I'm trying to embed some code from external website. The embedded code works fine in my webpage . However, a JSON object that is defined in the script tag causes problems of semicolon expectations in the VS Code.Program works properly even with errors. What should I do to get rid of these errors ?

MY CODE :

<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div class="tradingview-widget-container__widget"></div>

  <script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-forex-cross-rates.js" async>
    {
      "width": "800",
      "height": "500",
      "currencies": [
        "EUR",
        "USD",
        "JPY",
        "GBP",
        "CHF",
        "AUD",
        "CAD",
        "NZD",
        "CNY",
        "TRY",
        "SEK",
        "NOK",
        "DKK",
        "ZAR",
        "HKD",
        "SGD",
        "THB",
        "MXN",
        "IDR",
        "KRW",
        "PLN",
        "ISK",
        "KWD",
        "PHP",
        "MYR",
        "INR",
        "TWD",
        "SAR",
        "AED",
        "RUB",
        "ILS",
        "ARS",
        "CLP",
        "COP",
        "PEN",
        "UYU"
      ],
      "isTransparent": false,
      "colorTheme": "light",
      "locale": "en"
    }
  </script>
</div>
<!-- TradingView Widget END -->

enter image description here

Semicolon are expecting instead of colons such as "width":"800". Colons(:) are underlined with red color.

When I tried to declare that object with a name such as var a = {}, errors are disappearing however embedded code is not working.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!