⊗jsPrTstOQA 33 of 62 menu

Test with questions and answers in an object in JavaScript

In the previous lesson, our questions and answers were stored in different variables. This separation can often be inconvenient. Let's work with other storage options.

Let questions and answers be stored in such an object:

let questions = { 'Question 1?': 'answer 1', 'Question 2?': 'answer 2', 'Question 3?': 'answer 3', }

Solve the problem of creating a test for such a data storage option

Let questions and answers be stored in such an object:

let questions = [ { text: 'question 1?', right: 'answer 1', }, { text: 'question 2?', right: 'answer 2', }, { text: 'question 3?', right: 'answer 3', }, ];

Solve the problem of creating a test for such a data storage option.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline