1+ //Quiz Questions
2+ let questions = [
3+ {
4+ quizNumb : 1 ,
5+ question : "Which of the following terminal commands creates an empty html file within the folder named 'test'?" ,
6+ answer : "touch ./test/index.html" ,
7+ options : [
8+ "cd test/index.html" ,
9+ "touch ./test/index.html" ,
10+ "mv ./test/test2 ./test/index.html" ,
11+ "mkdir test/index.html"
12+ ]
13+ } ,
14+ {
15+ quizNumb : 2 ,
16+ question : "Which statement is not correct about HTML?" ,
17+ answer : "HTML is used to add styling to the elements in a webpage." ,
18+ options : [
19+ "HTML stands for Hyper Text Markup Language." ,
20+ "HTML can be used to build the structure of a webpage." ,
21+ "HTML is used to add styling to the elements in a webpage." ,
22+ "HTML allows us to define elements like paragraphs, images, links, and forms." ,
23+ ]
24+ } ,
25+ {
26+ quizNumb : 3 ,
27+ question : "Which of the following Git Commands creates a branch?" ,
28+ answer : "git checkout -b <branch name>" ,
29+ options : [
30+ "git checkout -b <branch name>" ,
31+ "git pull origin <branch name>" ,
32+ "git commit -m <branch name>" ,
33+ "git fetch <branch name>" ,
34+ ]
35+ } ,
36+ {
37+ quizNumb : 4 ,
38+ question : "________ is the scripting or programming language that allows you to implement complex features on web pages." ,
39+ answer : "Javascript" ,
40+ options : [
41+ "CSS" ,
42+ "API" ,
43+ "Javascript" ,
44+ "HTML" ,
45+ ]
46+ } ,
47+ {
48+ quizNumb : 5 ,
49+ question : "The _______ allows you to manipulate HTML and CSS, creating, removing and changing HTML." ,
50+ answer : "DOM API" ,
51+ options : [
52+ "Geolocation API" ,
53+ "DOM API" ,
54+ "WebGL API" ,
55+ "None of the above" ,
56+ ]
57+ } ,
58+ {
59+ quizNumb : 6 ,
60+ question : "Which of the following examples is not a valid variable name for Javascript?" ,
61+ answer : "10cent" ,
62+ options : [
63+ "$here" ,
64+ "_name" ,
65+ "sort135" ,
66+ "10cent" ,
67+ ]
68+ } ,
69+ {
70+ quizNumb : 7 ,
71+ question : "What is the correct Javascript syntax to access 2 in the array? const random = ['squid', 795, [0, 1, 2]];" ,
72+ answer : "random[2][2]" ,
73+ options : [
74+ "random(0,3)" ,
75+ "console.log(random);" ,
76+ "random[2][2]" ,
77+ "console.log(random.length);" ,
78+ ]
79+ } ,
80+ {
81+ quizNumb : 8 ,
82+ question : "Which of the following does not remove an element from an array?" ,
83+ answer : "push()" ,
84+ options : [
85+ "pop()" ,
86+ "shift()" ,
87+ "splice()" ,
88+ "push()" ,
89+ ]
90+ } ,
91+ {
92+ quizNumb : 9 ,
93+ question : "which of the following describes the Javascript function best?" ,
94+ answer : "The function definition is also called the function declaration." ,
95+ options : [
96+ "The function definition is also called the function declaration." ,
97+ "The function consists of the name of the function, and parameters, separated by semi-colon and enclosed in curly braces." ,
98+ "Parameters are essentially passed to functions by variable." ,
99+ "All of the above." ,
100+ ]
101+ } ,
102+ {
103+ quizNumb : 10 ,
104+ question : "Which of the following instance method combines the text of two (or more) strings and returns a new string?" ,
105+ answer : "String.prototype.concat()" ,
106+ options : [
107+ "String.prototype.includes()" ,
108+ "String.prototype.concat()" ,
109+ "String.prototype.at()" ,
110+ "String.prototype.substring()" ,
111+ ]
112+ }
113+ ] ;
0 commit comments