Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Javascript Quiz QUESTION 1 In JavaScript, you make a variable global by declarin

ID: 3748818 • Letter: J

Question

Javascript Quiz


QUESTION 1

In JavaScript, you make a variable global by declaring it using the global keyword.

True

False

QUESTION 2

When a variable has a global scope, any code on your page can access or modify it.

True

False

QUESTION 3

When a variable is declared globally, it is a child of the 'window' object, meaning a variable named 'counter' can be accessed by referencing counter or window.counter.

True

False

QUESTION 4

Define BLOCK SCOPING in your own words.

QUESTION 5

The 'let' keyword allows you to give a variable a scope accessible to only the code block it is in.

True

False

QUESTION 6

Which of the following are valid JavaScript comment lines.            

/*

This is a comment.

*/        

# This is a comment.  

' This is a comment.               

// This is a comment.

QUESTION 7

When should you comment your code?

                       

While you are writing it.        

When the code is very confusing.      

When you are finished coding.          

Never.

QUESTION 8

When commenting code, you should use less natural language and stick more to JavaScript style of writing.

True

False

QUESTION 9

You should comment every line of code, regardless if it is obvious what it does.

True

False

QUESTION 10

Use of whitespace can help your comments stand out and make your code more readable.

True

False

QUESTION 11

NULL and 0 are the same thing.

True

False

QUESTION 12

Which of the following is a built in JavaScript Object.                    

Date               

Math   

Number          

All of the Above

QUESTION 13

What does the Array object in JavaScript do?          

Allows you to work with numbers.    

Provides functionality for pattern matching.

Allows you to invoke some code among other esoteric things.

Helps store, retrieve, and manipulate a collection of data.

QUESTION 14

Objects can be thought of as a Black Box. You don't necessarily have to know what's happening inside, just how to use them.

True

False

QUESTION 15

If you had wanted to round a decimal number, you could use Math.round().

True

False

Explanation / Answer

Note you can post only 4 questions per question in Chegg ...

Question 1:
Answer: False
there is not keyword called global

Question 2:
Answer: True

Question 3:
Answer: True

Question 4:
Answer: If a variable is declared inside block the scope of variable is within the block

Question 5:
Answer: True

Question 6:
Answer:
/*

This is a comment.

*/   

// This is a comment.

Question 7:
Answer: When the code is very confusing.  

Question 8:
Answer: False

Question 9:
Answer: False

Question 10:
Answer: True

Question 11:
Answer: False

Question 12:
Answer: All of the Above

Question 13:
Answer: Helps store, retrieve, and manipulate a collection of data.

Question 14:
Answer: True

Question 15:
Answer: True

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote