Final Exam Flashcards
(130 cards)
Concerning web development, MDN is an acronym for:
Mozilla Developer Network
Which of the following is NOT an integrated development environment (IDE)?
Git Bash
To begin using git with a project, the first command you should issue is:
git init
Which developer tool stores your project in an online code repository and allows you to share it with others?
GitHub
You can use git inside of Visual Studio Code
True
Which developer tool tracks each change to your project on your computer?
git
What option should always be included with the command git commit?
-m
The command line interface for git is called:
Git Bash
In the Visual Studio Code file tree, a file that has a U beside it indicates it has been uploaded by git.
false
After adding your file changes to your git repository with git add, what is the next step git requires?
git commit
Using the .slice() method, complete the following code so that it returns the last 4 characters of whatever value myString holds.
myString.slice(_____);
-4
What type of data will the following line of code return?
“taco cat”.indexOf(‘taco’, 1) !== -1;
boolean
Choose the result of:
“humpty” + 3 + 2 + “dumpty”;
humpty32dumpty
If I declare a variable like this:
let myInt;
It automatically has a value of zero.
false
let myName = “Dave”;
The letter “e” has an index position of 3.
true
Choose the result of:
2 + 3 + “foot” + “ball”;
5football
let myInt = 0;
myInt++;
The variable myInt is now equal to zero because zero plus zero is still zero.
false
I need to generate a random number between 1 and 50. Help me by filling in the blank to complete the equation.
_______(Math.random() * 50) + 1;
Math.floor
Javascript variables are named using ________.
camelCase
I need to return the remainder of 13 divided by 5. Which operator achieves the result I need?
%
Which statement in a for loop is required?
Select the best answer.
None - all for loop statements are optional.
Please fill-in the blank to complete the for loop below so it will execute the loop once for each letter in any name the user enters:
var myName = ‘any-name-entered’; //do not take this string literally - It should work for Dave or Harold or Sue or whoever enters their name.
for(var x = 0; x < ____; x++) { \ case-sensitive - no spaces please
console.log(myName[x]);
}
myName.length
You cannot have over five ELSE IF statements in your IF statement
false
It is easy to create an endless loop by mistake.
What should we add to the code block of the loop below to prevent it from being an endless loop?
Select ALL answers that will work (together if necessary) to prevent the loop from being an endless loop.
var x = 1;
while(x > 0) {
console.log(x);
}
A break statement
x++
An IF statement to check if x > 50