///
Para que o bloco de código exiba 0146 vermelha, a lacuna I deve ser corretamente preenchida por","text":"Considere o bloco de código abaixo que utiliza JavaScript e JSON.
Para que o bloco de código exiba 0146 vermelha, a lacuna I deve ser corretamente preenchida por","answerCount":5,"datePublished":"2019-01-01T00:00:00-03:00","author":{"@type":"Organization","name":"FCC","url":"https://questionei.com"},"suggestedAnswer":[{"@type":"Answer","text":"x.trens[2].trem + \" \" + x.trens[2].linha","position":1,"encodingFormat":"text/html","upvoteCount":0,"datePublished":"2019-01-01T00:00:00-03:00","url":"https://questionei.com/questoes/457941204137105/#alternativa-0","author":{"url":"https://questionei.com","@type":"Organization","name":"FCC"}},{"@type":"Answer","text":"text.trens[trem] + \" \" + text.trens[linha]","position":2,"encodingFormat":"text/html","upvoteCount":0,"datePublished":"2019-01-01T00:00:00-03:00","url":"https://questionei.com/questoes/457941204137105/#alternativa-1","author":{"url":"https://questionei.com","@type":"Organization","name":"FCC"}},{"@type":"Answer","text":"x.trens[1].trem + \" \" + x.trens[1].linha","position":3,"encodingFormat":"text/html","upvoteCount":0,"datePublished":"2019-01-01T00:00:00-03:00","url":"https://questionei.com/questoes/457941204137105/#alternativa-2","author":{"url":"https://questionei.com","@type":"Organization","name":"FCC"}},{"@type":"Answer","text":"x.trens[trem] + \" \" + x.trens[linha]","position":4,"encodingFormat":"text/html","upvoteCount":0,"datePublished":"2019-01-01T00:00:00-03:00","url":"https://questionei.com/questoes/457941204137105/#alternativa-3","author":{"url":"https://questionei.com","@type":"Organization","name":"FCC"}},{"@type":"Answer","text":"text.trens[1].trem + \" \" + text.trens[1].linha","position":5,"encodingFormat":"text/html","upvoteCount":0,"datePublished":"2019-01-01T00:00:00-03:00","url":"https://questionei.com/questoes/457941204137105/#alternativa-4","author":{"url":"https://questionei.com","@type":"Organization","name":"FCC"}}],"acceptedAnswer":{"@type":"Answer","text":"x.trens[1].trem + \" \" + x.trens[1].linha","encodingFormat":"text/html","datePublished":"2019-01-01T00:00:00-03:00","url":"https://questionei.com/questoes/457941204137105/#resposta-correta","author":{"url":"https://questionei.com","@type":"Organization","name":"FCC"}}}} Considere o bloco de código abaixo que utiliza JavaScript e JSON. Para que o bloco de código exiba 0146 vermelha, a lacuna I deve ser corretamente preenchida porConsidere o bloco de código abaixo que utiliza JavaScript e JSON.<body> <p id="exibe"></p> <script> var text = '"trens":...
Ano: 2019Banca: FCCOrganização: METRÔ-SPDisciplina: Linguagens de ProgramaçãoTemas: JavaScript Object Notation<body>
<p id="exibe"></p>
<script>
var text = '{"trens":[' +
'{"trem":"0145","linha":"azul" },' +
'{"trem":"0146","linha":"vermelha" },' +
'{"trem":"0147","linha":"verde" }]}';
x = JSON.parse(text);
document.getElementById("exibe").innerHTML = I ;
</script>
</body>