Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

211
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda