Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

CIS-131 Cert Study

CIS-131 Cert Study Guide

QuestionAnswer
Inside which HTML element do we put the JavaScript? A) <script> B) <javascript> C) <js> D) <scripting> A
What is the correct JavaScript syntax to change the content of the HTML element below? <p id="demo">THis is a demo</p> A) document.getElementByName("p").innerHTML = "Hello World!"; B) document.getElementById("demo").innerHTML = "Hello World!"; B
Where is the correct place to insert JavaScript? A) In the <head> section B) In the <body> section C) Either the <head> or the <body> section D) None of the above. JavaScript is inserted in a separate file C
What is the correct syntax for referring to an external script called "xxx.js"? A) <script name="xxx.js"> B) <script src="xxx.js"> C) <script href="xxx.js"> D) <script file="xxx.js"> B
The external JavaScript file must contain the <script> tag False Explanation: The external JavaScript file should not contain the <script> tag. The <script> tag is
How do you write "Hello World" in an alert box? A) alertBox("Hello World"); B) msg("Hello World"); C) msgBox("Hello World"); D) alert("Hello World"); D
How do you create a function in JavaScript? A) function = myFunction() B) function:myFunction() C) function myFunction() D) function myFunction() {} D
How do you call a function named "myFunction"? A) myFunction(); B) call myFunction(); C) call function myFunction(); D) run myFunction(); A
How do you write an IF statement in JavaScript? A) if (i == 5) then B) if i = 5 C) if i == 5 then D) if (i == 5) D
How do you write an IF statement for executing some code if "i" is NOT equal to 5? A) if i <> 5 B) if (i != 5) C) if i =! 5 D) if (i !== 5) B
How does a WHILE loop start? A) while i = 1 to 10 B) while (i <= 10) C) while (i <= 10; i++) D) while i <= 10: B
How does a FOR loop start? A) for (i <= 5; i++) B) for (i = 0; i <= 5) C) for i = 1 to 5 D) for (i = 0; i <= 5; i++) D
How can you add a single-line comment in JavaScript? A) <!--This is a comment--> B) //This is a comment C) /*This is a comment*/ D) comment: This is a comment B
How can you add a multi-line comment in JavaScript? A) <!--This is a comment--> B) //This is a comment C) /*This is a comment*/ D) comment: This is a comment C
What is the correct way to write a JavaScript array? A) var colors = "red", "green", "blue"; B) var colors = (1:"red", 2:"green", 3:"blue"); C) var colors = ["red", "green", "blue"]; D) var colors = 1=("red"), 2=("green"), 3=("blue"); C
How do you round the number 7.25 to the nearest integer? A) Math.rnd(7.25) B) round(7.25) C) Math.round(7.25) D) rnd(7.25) C
How do you find the number with the highest value of x and y? A) Math.ceil(x, y) B) top(x, y) C) ceil(x, y) D) Math.max(x, y) D
What is the correct JavaScript syntax for opening a new window called "OTC" that opens in a new tab to "otc.edu"? A) window.newTab("otc.edu", "OTC"); B) window.open("otc.edu", "OTC", "_blank"); C) window.open("otc.edu", "OTC"); C
JavaScript is the same as Java False
How can you detect the client's browser name? A) navigator.browserName B) client.browser.name C) navigator.appName D) browser.name C
How do you declare a JavaScript variable? A) new variableName; B) let variableName; or var variableName; C) variableName = value; D) variable variableName; B
In JavaScript,difference between let and var? A) let is block-scoped, while var is function-scoped. B) var is block-scoped, while let is function-scoped. C) There is no difference between let and var. A
How do you declare a JavaScript constant? A) const constantName = value; B) var constantName = value; C) let constantName = value; D) constant constantName = value; A
How do you declare a JavaScript function? A) function = myFunction() {} B) let myFunction() {} C) var myFunction = function() {} D) function myFunction() {} D
How do you declare a JavaScript class? A) class = myClass {} B) var myClass = class {} C) function myClass() {} D) class myClass {} D
What will the following code return: Boolean(10 > 9)? True
How do you write to a JSON file with JavaScript? A) JavaScript cannot write to a file directly B) Use the fs.writeFile() method in Node.js C) Use the JSON.stringify() method to convert the data to JSON format B
Which of the following is properly formatted JSON? A) {name: "John", age: 30} B) {"name": "John", "age": 30} C) ('name': 'John', 'age': 30) D) [name: "John", age: 30] B
JavaScript is case-sensitive True
What is asynchronous programming in JavaScript? A) Running multiple threads simultaneously B) Executing code in sequence, one after the other C) Running code simultaneously without blocking the execution of other code C
Which of the following is NOT a method for working with arrays in JavaScript? A) slice() B) splice() C) push() D) reverse() C
What is the purpose of the try...catch statement in JavaScript? A) To execute code in a loop B) To handle errors and exceptions C) To declare a new variable D) To create a new function B
What is a closure in JavaScript? A) A function that returns another function B) A way to create private variables and methods in a function C) A way to stop code execution D) A method for iterating over an array B
Which of the following is NOT a decision statement in JavaScript? A) if...else B) switch...case C) ternary operator D) for...in loop A
What is a promise in JavaScript? A) A way to handle errors and exceptions B) A method for working with data collections C) A way to work with asynchronous code D) A method for iterating over an array C
Which of the following is NOT a way to work with variables, operators, and expressions in JavaScript? A) let B) const C) var D) function A
What is a prototype in JavaScript? A) A function that creates new objects B) A way to extend the properties and methods of an object C) A method for working with data collections D) A way to handle errors and exceptions B
What is the purpose of the JQuery library in JavaScript? A) To handle errors and exceptions B) To work with asynchronous code C) To simplify HTML document traversal and manipulation, as well as event handling and animation C
What is the purpose of data validation in JavaScript? A) To execute code in a loop B) To handle errors and exceptions C) To ensure that data is correct and useful D) To create new functions C
Created by: challa
Popular Engineering sets

 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards