JSFiddle - React, Tailwind, and code Playground
JavaScript
const objectName = [
{
question: 'What is the most used programming language in 2019?',
answers: [ 'Java', 'C', 'Python', 'JS' ]
},
{
question: 'Who is the President of US?',
answers: [ 'Florin Pop', 'Joe Biden', 'Ivan Saldano', 'Mihai Andrei' ]
},
{
question: 'What does HTML stand for?',
answers: [
'Hypertext Markup Language',
'Cascading Style Sheet',
'Jason Object Notation',
'Helicopters Terminals Motorboats Lamborginis'
]
},
{
question: 'What year was JavaScript launched?',
answers: [ '1996', '1995', '1994', 'none of the above' ]
}
];
for(let i = 0; i < objectName.length; i++){
for(const value in objectName[i]){
for(let j = 0; j < objectName[i][value].length; j++){
console.log(objectName[i][value][j]);
}
}
}