beanstalkedu-exam-portal/public/assets/qs.json

309 lines
7.2 KiB
JSON

[
{
"id" : 17567,
"qs" : "Inside which HTML element do we put the JavaScript?",
"options" : [
"<script>",
"<javascript>",
"<scripting>",
"<js>"
],
"answer":"<script>",
"score":0,
"status": ""
},
{
"id" : 4545,
"qs" : "Where is the correct place to insert a JavaScript?",
"options" : [
"The <head> section",
"The <body> section",
"Both the <head> section and the <body> section are correct"
],
"answer":"Both the <head> section and the <body> section are correct",
"score":0,
"status": ""
},
{
"id" : 223,
"qs" : "What is the correct syntax for referring to an external script called 'xxx.js'?",
"options" : [
"&ltscript href="xxx.js">",
"<script name="xxx.js">",
"<script src="xxx.js">"
],
"answer":"<script src="xxx.js">",
"score":0,
"status": ""
},
{
"id" : 867,
"qs" : "The external JavaScript file must contain the <script> tag.",
"options" : [
"True",
"False"
],
"answer":"False",
"score":0,
"status": ""
},
{
"id" : 5544,
"qs" : "How do you write "Hello World" in an alert box?",
"options" : [
"alertBox("Hello World");",
"msg("Hello World");",
"alert("Hello World");",
"msgBox("Hello World");"
],
"answer":"alert("Hello World");",
"score":0,
"status": ""
},
{
"id" : 765,
"qs" : "How do you create a function in JavaScript?",
"options" : [
"function myFunction()",
"function:myFunction()",
"function = myFunction()"
],
"answer":"function myFunction()",
"score":0,
"status": ""
},
{
"id" : 108,
"qs" : "How do you call a function named "myFunction"?",
"options" : [
"call function myFunction()",
"call myFunction()",
"myFunction()"
],
"answer":"myFunction()",
"score":0,
"status": ""
},
{
"id" : 4328,
"qs" : "How to write an IF statement in JavaScript?",
"options" : [
"if i = 5 then",
"if i == 5 then",
"if (i == 5)",
" if i = 5"
],
"answer":"if (i == 5)",
"score":0,
"status": ""
},
{
"id" : 989,
"qs" : "Which of the following is a disadvantage of using JavaScript?",
"options" : [
"Client-side JavaScript does not allow the reading or writing of files.",
"JavaScript can not be used for Networking applications because there is no such support available.",
"JavaScript doesn't have any multithreading or multiprocess capabilities.",
"All of the above."
],
"answer":"All of the above.",
"score":0,
"status": ""
},
{
"id" : 1450,
"qs" : "How to write an IF statement for executing some code if "i" is NOT equal to 5?",
"options" : [
"if (i <> 5)",
"if i <> 5",
"if (i != 5)",
"if i =! 5 then"
],
"answer":"if (i != 5)",
"score":0,
"status": ""
},
{
"id" : 211,
"qs" : "How does a WHILE loop start?",
"options" : [
"while i = 1 to 10",
"while (i &lt;= 10; i++)",
"while (i &lt;= 10)"
],
"answer":"while (i &lt;= 10)",
"score":0,
"status": ""
},
{
"id" : 12,
"qs" : "How does a FOR loop start?",
"options" : [
"for (i = 0; i &lt;= 5)",
"for (i = 0; i &lt;= 5; i++)",
"for i = 1 to 5",
"for (i &lt;= 5; i++)"
],
"answer":"for (i = 0; i &lt;= 5; i++)",
"score":0,
"status": ""
},
{
"id" : 13,
"qs" : "How can you add a comment in a JavaScript?",
"options" : [
"//This is a comment",
"&sbquo;This is a comment",
"&lt;!--This is a comment--&gt;"
],
"answer":"//This is a comment",
"score":0,
"status": ""
},
{
"id" : 14,
"qs" : "How to insert a comment that has more than one line?",
"options" : [
"/*This comment has more than one line*/",
"//This comment has more than one line//",
"&lt;!--This comment has more than one line--&gt;"
],
"answer":"/*This comment has more than one line*/",
"score":0,
"status": ""
},
{
"id" : 15,
"qs" : "What is the correct way to write a JavaScript array?",
"options" : [
"var colors = (1:&quot;red&quot;, 2:&quot;green&quot;, 3:&quot;blue&quot;)",
"var colors = [&quot;red&quot;, &quot;green&quot;, &quot;blue&quot;]",
"var colors = 1 = (&quot;red&quot;), 2 = (&quot;green&quot;), 3 = (&quot;blue&quot;)",
"var colors = &quot;red&quot;, &quot;green&quot;, &quot;blue&quot;"
],
"answer":"var colors = [&quot;red&quot;, &quot;green&quot;, &quot;blue&quot;]",
"score":0,
"status": ""
},
{
"id" : 16,
"qs" : "How do you round the number 7.25, to the nearest integer?",
"options" : [
"rnd(7.25)",
"Math.round(7.25)",
"Math.rnd(7.25)",
"round(7.25)"
],
"answer":"Math.round(7.25)",
"score":0,
"status": ""
},
{
"id" : 17,
"qs" : "How do you find the number with the highest value of x and y?",
"options" : [
"Math.max(x, y)",
"Math.ceil(x, y)",
"top(x, y)",
"ceil(x, y)"
],
"answer":"Math.max(x, y)",
"score":0,
"status": ""
},
{
"id" : 18,
"qs" : "What is the correct JavaScript syntax for opening a new window called &quot;w2&quot;?",
"options" : [
"w2 = window.new(&quot;http://www.w3schools.com&quot;);",
"w2 = window.open(&quot;http://www.w3schools.com&quot;);"
],
"answer":"w2 = window.open(&quot;http://www.w3schools.com&quot;);",
"score":0,
"status": ""
},
{
"id" : 19,
"qs" : "JavaScript is the same as Java.",
"options" : [
"true",
"false"
],
"answer":"false",
"score":0,
"status": ""
},
{
"id" : 20,
"qs" : "How can you detect the client&rsquo;s browser name?",
"options" : [
"navigator.appName",
"browser.name",
"client.navName"
],
"answer":"navigator.appName",
"score":0,
"status": ""
},
{
"id" : 21,
"qs" : "Which event occurs when the user clicks on an HTML element?",
"options" : [
"onchange",
"onclick",
"onmouseclick",
"onmouseover"
],
"answer":"onclick",
"score":0,
"status": ""
},
{
"id" : 22,
"qs" : "How do you declare a JavaScript variable?",
"options" : [
"var carName;",
"variable carName;",
"v carName;"
],
"answer":"var carName;",
"score":0,
"status": ""
},
{
"id" : 23,
"qs" : "Which operator is used to assign a value to a variable?",
"options" : [
"*",
"-",
"=",
"x"
],
"answer":"=",
"score":0,
"status": ""
},
{
"id" : 24,
"qs" : "What will the following code return: Boolean(10 &gt; 9)",
"options" : [
"NaN",
"false",
"true"
],
"answer":"true",
"score":0,
"status": ""
},
{
"id" : 25,
"qs" : "Is JavaScript case-sensitive?",
"options" : [
"No",
"Yes"
],
"answer":"Yes",
"score":0,
"status": ""
}
]