JAVASCRIPT Flashcards

1
Q

It is lightweight and most commonly used as a part of web pages, whose implementations allow client-side script to interact with the user
and make dynamic pages.

A

JavaScript

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  • It is complimentary to and integrated with Java. A very easy to implement because it is integrated with HTML. It is open and cross-platform.
    -a dynamic computer programming language.
A

JavaScript

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

Why to Learn Javascript?

A
  • Javascript is the most popular programming language in the world and that makes it a programmer’s great choice
    -Javascript is everywhere, it comes installed on every modern web browser and so to learn Javascript you really do not need any special environment setup
  • Javascript helps you create really beautiful and crazy fast websites.
  • JavaScript usage has now extended to mobile app development,desktop app development, and game development.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the output of this?

<html>
<body>

<script>
document.write("Hello World!")
</script>

</body>
</html>
A

Hello World!

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

Enumerate the applications of JavaScript Programming

A
  • Client side validation
  • Manipulating HTML Pages
  • User Notifications
  • Presentations
  • Server Applications
  • Back-end Data Loading
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

the most common form of the language.
The script should be included in or referenced by an HTML document for the code to be interpreted by the browser.

A

Client-side JavaScript

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

True or False

The JavaScript code is executed when the user submits the form, and only if all the entries are valid, they would be submitted to the Web Server.

A

True

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

True or False

JavaScript can be used to trap user-initiated events such as button clicks, link navigation, and other actions that the user initiates explicitly or implicitly.

A

True

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

Enumerate the Advantages of JavaScript

A
  • Less server interaction
  • Immediate feedback to the visitors
  • Increase interactivity
  • Richer interfaces
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

You can validate user input before sending the page off to the server.

A

Less server interaction

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

They don’t have to wait for a page reload to see if they have forgotten to enter something.

A

Immediate feedback to the visitors

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

You can create interfaces that react when the user hovers over them with a mouse or activates them via the keyboard.

A

Increased interactivity

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

You can use JavaScript to include such items as drag-and-drop components and sliders to give a Rich Interface to your site visitors.

A

Richer interfaces

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

What are the limitations of JavaScript

A

-Client-side JavaScript does not allow the reading or writing of files. This has been kept for security reason
-JavaScript cannot be used for networking applications because there is no such support available.
-JavaScript doesn’t have any multi-threading or multiprocessor capabilities.

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

True or False

  • JavaScript can be implemented using JavaScript statements that are placed within the
    ... 
    HTML tags in a web page.
A

True

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

True or False

You can place the

 tags, containing your JavaScript, anywhere within your web page, but it is normally recommended that you should keep it within the <head> tags.
17
Q

Enumerate the two important attributes in script tags

A

-Language
- Type

18
Q

This attribute specifies what scripting language you are using. Typically, its value will be JavaScript.

19
Q

This attribute is what is now recommended to indicate the scripting language in use and its value should be set to “text/javascript”.

20
Q

JavaScript ignores spaces, tabs, and newlines that appear in JavaScript programs.

A

Whitespace and Line Breaks

21
Q

Simple statements in JavaScript are generally followed by a semicolon character, just as they are in C, C++, and Java.

A

Semicolons are Optional

22
Q

JavaScript is a _______________ language. This means that the language keywords, variables, function names, and any other identifiers must always be typed with a consistent capitalization of letters.

A

case-sensitive / case sensitivity

23
Q

What is the comment in JavaScript?

A

// and /* */

24
Q

What is the external file from HTML to JavaScript?

25
what three primitive data types allow you to work with JavaScript?
➢ Numbers, eg. 123, 120.50 etc. ➢ Strings of text e.g. "This text string" etc. ➢ Boolean e.g. true or false.
26
JavaScript also defines two trivial data types,_____ and _______ , each of which defines only a single value.
null and undefined
27
**True or False** JavaScript supports a composite data type known as object.
True
28
**True or False** -Before you use a variable in a JavaScript program, you must declare it. Variables are declared with the var keyword as follows.
True
29
**True or False** Storing a value in a variable is called variable initialization. You can do variable initialization at the time of variable creation or at a later point in time when you need that variable
True
30
**True or False** - Use the var keyword only for declaration or initialization, once for the life of any variable name in a document. You should not re- declare same variable twice. -JavaScript is untyped language. This means that a JavaScript variable can hold a value of any data type.
True
31
**True or False** -Unlike many other languages, you don't have to tell JavaScript during variable declaration what type of value the variable will hold. - The value type of a variable can change during the execution of a program and JavaScript takes care of it automatically.
True
32
What are the variable scope in JavaScript?
-Global variables - Local Variables
33
it can be defined anywhere in your JavaScript code.
Global Variables
34
The variable that will be visible only within a function where it is defined. Function parameters are always local to that function.
Local Variables
35
Enumerate the JavaScript operator
- Arithmetic Operators - Comparison Operators - Logical (or Relational) Operators - Assignment Operators - Conditional (or ternary) Operators