Finals QUIZ 1 Flashcards

(106 cards)

1
Q

What is JavaScript?

A

A dynamic computer programming language, lightweight and commonly used for web pages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What was JavaScript originally known as?

A

LiveScript

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In which year did JavaScript make its first appearance?

A

1995

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the ECMA-262 Specification define?

A

A standard version of the core JavaScript language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What programming capabilities does JavaScript have?

A

Object-oriented capabilities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is client-side JavaScript?

A

The most common form of JavaScript, included in or referenced by an HTML document

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a major advantage of client-side JavaScript?

A

It allows web pages to be dynamic and interactive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Name one advantage of using JavaScript.

A

Less server interaction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is one limitation of JavaScript?

A

It cannot read or write files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is required to start developing JavaScript?

A

A simple text editor like Notepad

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the purpose of JavaScript development tools like Microsoft FrontPage?

A

To assist in the creation of interactive websites

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the ECMAScript Edition 5 standard?

A

The first update to JavaScript in over four years

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What types of data types does JavaScript support?

A

Primitive data types and composite data types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

List the three primitive data types in JavaScript.

A
  • Numbers
  • Strings
  • Boolean
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the two trivial data types in JavaScript?

A
  • null
  • undefined
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a variable in JavaScript?

A

A named container for storing data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How do you declare a variable in JavaScript?

A

Using the var keyword

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is variable initialization?

A

Storing a value in a variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is the scope of a variable?

A

The region of the program in which it is defined

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What are the two scopes of variables in JavaScript?

A
  • Global Variables
  • Local Variables
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is an operator?

A

A symbol that performs operations on operands

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What types of operators does JavaScript support?

A
  • Arithmetic Operators
  • Comparison Operators
  • Logical Operators
  • Assignment Operators
  • Conditional Operators
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is an example of an arithmetic operator in JavaScript?

A

+ (Addition)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What does the modulus operator (%) do?

A

Outputs the remainder of an integer division

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What does the comparison operator '==' check?
If the values of two operands are equal
26
What does the logical operator '&&' represent?
Logical AND
27
What is the result of the expression (A && B) if A is 10 and B is 20?
true
28
What is the output of the expression (A < B) when A is 10 and B is 20?
true
29
What does the logical NOT operator (!) do?
Reverses the logical state of its operand
30
What is the purpose of bitwise operators in JavaScript?
To perform operations on individual bits of integer arguments
31
What does the Bitwise AND operator (&) do?
Performs a Boolean AND operation on each bit of its integer arguments. ## Footnote Example: (A & B) is 2 when A holds 2 and B holds 3.
32
What does the Bitwise OR operator (|) do?
Performs a Boolean OR operation on each bit of its integer arguments. ## Footnote Example: (A | B) is 3 when A holds 2 and B holds 3.
33
What is the result of the Bitwise XOR operator (^) when applied to A = 2 and B = 3?
1 ## Footnote Exclusive OR means that either operand one is true or operand two is true, but not both.
34
What does the Bitwise Not operator (~) do?
Reverses all the bits in the operand. ## Footnote Example: (~B) is -4 when B holds 3.
35
What does the Left Shift operator (<<) do?
Moves all the bits in its first operand to the left by the number of places specified in the second operand. ## Footnote Example: (A << 1) is 4 when A holds 2.
36
What does the Right Shift operator (>>) do?
Moves the left operand’s value right by the number of bits specified by the right operand. ## Footnote Example: (A >> 1) is 1 when A holds 2.
37
What is the difference between >> and >>> operators?
The >> operator shifts bits and retains the sign, while >>> shifts bits and fills in with zeros. ## Footnote Example: (A >>> 1) is 1 when A holds 2.
38
What is the purpose of the assignment operator (=)?
Assigns values from the right side operand to the left side operand. ## Footnote Example: C = A + B assigns the value of A + B into C.
39
What does the Add and Assignment operator (+=) do?
Adds the right operand to the left operand and assigns the result to the left operand. ## Footnote Example: C += A is equivalent to C = C + A.
40
What does the Subtract and Assignment operator (-=) do?
Subtracts the right operand from the left operand and assigns the result to the left operand. ## Footnote Example: C -= A is equivalent to C = C - A.
41
What does the Multiply and Assignment operator (*=) do?
Multiplies the right operand with the left operand and assigns the result to the left operand. ## Footnote Example: C *= A is equivalent to C = C * A.
42
What does the Divide and Assignment operator (/=) do?
Divides the left operand by the right operand and assigns the result to the left operand. ## Footnote Example: C /= A is equivalent to C = C / A.
43
What does the Modulus and Assignment operator (%=) do?
Takes modulus using two operands and assigns the result to the left operand. ## Footnote Example: C %= A is equivalent to C = C % A.
44
What is the syntax of the conditional operator (?:)?
If Condition is true? Then value X : Otherwise value Y. ## Footnote Example: ((a > b) ? 100 : 200) evaluates based on the condition.
45
What does the typeof operator do?
Returns a string indicating the data type of the operand. ## Footnote Types include 'number', 'string', 'boolean', 'object', 'function', and 'undefined'.
46
What is the output of typeof when the operand is a number?
'number' ## Footnote This indicates that the operand is of type number.
47
What is the output of typeof when the operand is a string?
'string' ## Footnote This indicates that the operand is of type string.
48
What does an If-else statement do?
Executes a block of code if the condition is true, otherwise another block is executed.
49
What is the purpose of a Switch statement?
Compares one expression to several values and executes the corresponding case block.
50
What is a For loop used for?
Loops through a block of code a fixed number of times.
51
What is the function of a While loop?
Runs a block of code as long as the specified condition evaluates to true.
52
What is a Do-while loop?
Similar to a while loop but guarantees the code runs at least once.
53
What does the Break statement do in loops?
Exits the loop immediately, regardless of the loop's condition.
54
What does the Continue statement do in loops?
Skips the current iteration and moves on to the next.
55
What is the purpose of form validation?
Ensures that the data entered by users into forms is correct and follows the required format before submission.
56
What does the validateEmail function check?
Checks if the email entered is in a valid format using regular expressions.
57
What does the validateAge function do?
Checks if the input is a number and within a specified range.
58
What is an Event Listener?
Allows you to execute JavaScript functions when specific events occur.
59
What does the event object provide?
Additional information about the event, such as the target element or key pressed.
60
How can you remove an event listener?
Using the removeEventListener method.
61
What is Event Delegation?
Adding an event listener to a parent element to take advantage of event bubbling.
62
What is Web Hosting?
A service that allows hosting web applications on a server accessible via the Internet.
63
What are the advantages of Free Hosting?
* Free of cost * Websites can host advertisements
64
What are the disadvantages of Free Hosting?
* Lacks customer support * Low bandwidth * No control over your website
65
What is Shared Hosting?
A web hosting service where many websites reside on one web server.
66
What are the advantages of Dedicated Hosting?
* Ideal for large businesses * Strong database support * Unlimited software support
67
What are the disadvantages of Dedicated Hosting?
* Very expensive * Requires advanced technical skills
68
What is Dedicated Hosting?
Hosting on a dedicated server for exclusive use by a company. ## Footnote Best for large websites with high traffic.
69
List the advantages of Dedicated Hosting.
* Ideal for large businesses * Strong database support * Unlimited software support * Powerful email solutions * Complete root access to servers
70
What is Co-located Hosting?
Hosting where a user places their own web server on the premises of a service provider. ## Footnote Similar to dedicated hosting but the server is provided by the user.
71
List the advantages of Co-located Hosting.
* Greater bandwidth and high uptime * Unlimited software options * High security
72
What are the disadvantages of Co-located Hosting?
* Difficult to configure and debug * Expensive * Requires high technical skills
73
What is VPS Hosting?
A type of hosting that splits a physical server into multiple virtual servers. ## Footnote Each user gets their own virtual space.
74
List the advantages of VPS Hosting.
* More affordable than dedicated hosting * Greater control and customization than shared hosting * Better privacy and security compared to shared hosting
75
What are the disadvantages of VPS Hosting?
* More expensive than shared hosting * Requires more technical knowledge to manage * Limited resources compared to a dedicated server
76
What is Cloud Hosting?
Hosting that involves multiple virtual servers pulling from a network of physical servers. ## Footnote Offers high scalability and flexibility.
77
List the advantages of Cloud Hosting.
* Highly scalable * Pay-as-you-go pricing model * Generally offers high uptime and continuity
78
What are the disadvantages of Cloud Hosting?
* Can be more complex to configure * Costs can escalate if not managed properly * Security concerns due to shared resources
79
What is Managed Hosting?
Hosting where the provider manages system administration, including security and performance. ## Footnote Common for specific applications like WordPress.
80
List the advantages of Managed Hosting.
* Hassle-free management * Expert support * Enhanced security and performance optimizations
81
What are the disadvantages of Managed Hosting?
* More expensive than unmanaged hosting * Less control over the server * Potential for vendor lock-in
82
What is Reseller Hosting?
A hosting service where you purchase hosting and resell it to others. ## Footnote Good for starting a hosting business.
83
List the advantages of Reseller Hosting.
* Generate income by hosting websites for others * Scalable as your business grows * Usually comes with management tools
84
What are the disadvantages of Reseller Hosting?
* Responsibility for clients’ websites * Requires time to manage * Dependency on the underlying hosting provider
85
What is WordPress Hosting?
Hosting optimized specifically for WordPress sites. ## Footnote Offers tailored features for the platform.
86
List the advantages of WordPress Hosting.
* Optimized environment for WordPress * Easy one-click installations * Expert WordPress support often available
87
What are the disadvantages of WordPress Hosting?
* Generally more costly than shared hosting * Limited to only WordPress * Sometimes over-optimized for small sites
88
What factors should you consider when choosing web hosting?
* Traffic Volume * Budget * Technical Skills * Scalability * Special Needs
89
What does DNS stand for?
Domain Name System.
90
What is a Domain Name?
A human-readable representation of an IP address.
91
What is an IP Address?
A unique identifier for each computer on the internet.
92
What is a TLD?
Top Level Domain; the last part of a domain name, such as .com or .org.
93
What is an SLD?
Second Level Domain; the most human-readable part of a domain name.
94
What is a Sub-Domain?
An additional domain name that can be part of a larger domain.
95
What is an Addon Domain?
A separate domain hosted on a primary domain, controlled through the same control panel.
96
What is a Parked Domain?
A secondary domain that points to a primary domain, displaying the same website.
97
What are A-Records?
Address Records that point to a specific IP address.
98
What are CNAME-Records?
Canonical Domain Records used to point to a domain name or file.
99
What are MX-Records?
Mail Exchange Records that point to an email server.
100
What is a PTR Record?
A reverse DNS record mapping an IP address to a hostname.
101
What is a DNS Cluster?
A network of nameservers that share records between each other.
102
What is Round Robin DNS?
A method where a DNS record has multiple values, alternating for each request.
103
What is a web server?
Software that handles HTTP requests and serves web pages.
104
List popular web servers.
* Apache * Nginx
105
What are common security measures for web servers?
* SSL/TLS * DDoS Protection * Firewalls * Regular Updates
106