What's the standard extension for JavaScript files?
.javascript
.js
.html
.css
Other
Please Specify:
Which is not a standard JavaScript type?
Number
Integer
String
Boolean
Other
Please Specify:
What is a variable?
A "box" that stores information
A "box" that stores an unchangeable value
A JavaScript statement
A JavaScript number
Other
Please Specify:
If a user enters "10" when prompted, what will the result be?
varx=Number (prompt("Enter a value:"));
varresult=x*3-1;
result+=5;
console.log(result);
24
34
4
Undefined
Other
Please Specify:
If a variable's role is to store the total amount of an invoice, what should we name it (in compliance with camelCase)?
Invoice_total
InvoiceTotal
InvoiceTotal
Invoicetotal
Other
Please Specify:
If a user enters 10, what will the result be?
varx=Number(prompt("Enter a value:"));
if(x<=10){
if(x>=5){
console.log("A");
}
console.log("B");
}else{
console.log("C");
}
"A"
"B"
"C"
"A" and "B"
Other
Please Specify:
Which operator should be used in the place of "???" so that the statements make sense?
varnum1=Number(prompt("Enter the number 1:"));
varnum2=Number(prompt("Enter the number 2:"));
if((num1<0)???(num2<0)){
console.log("At least one of the two numbers is negative");
}else{
console.log("The two numbers are positive or zero");
}
AND operator: &&
OR operator: ||
NOT operator: !
No operator
Other
Please Specify:
How many times will the text display in this program?
vari=0;
while(i<=4){
console.log("Hey there!");
i++;
}
4 times
5 times
3 times
Infinite times
Other
Please Specify:
How many times will the text display in this program?
for(vari=1;i<5;i++){
console.log("What's up?");
}
4 times
5 times
6 times
Infinite times
Other
Please Specify:
When you don't know how many times a loop should run, which loop type should you choose?
While loop
For loop
While or For, either one
Other
Please Specify:
{"name":"JavaScript Basics", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"What's the standard extension for JavaScript files?, Which is not a standard JavaScript type?, What is a variable?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}