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

1. Ajax can use the following data formats: 2. ____ is a combination of JavaScri

ID: 3562854 • Letter: 1

Question

1.

Ajax can use the following data formats:

2.

____ is a combination of JavaScript, HTML, CSS, and the Document Object Model.

3.

In JavaScript, _____ errors are problems in the design of a program that prevent it from running as you anticipate it will run.

4.

What are the downsides of libraries?

5.

You are not allowed to have any other statements on the same line as the if statement.

6.

To ensure that loops execute correctly, you must include code that changes the value of the conditional expression.

7.

What are the three main functions of JavaScript?

8.

HTML5 is the concept of semantic markup bundled with JavaScript APIs.

9.

One example of a logic error is the creation of an infinite loop.

10.

Which of the following statements uses correct syntax?

1.

Ajax can use the following data formats:

A) All of the above
B) JSON
C) HTML
D) XML

2.

____ is a combination of JavaScript, HTML, CSS, and the Document Object Model.

A) TLS
B) SSL
C) AJAX
D) HTTPS

3.

In JavaScript, _____ errors are problems in the design of a program that prevent it from running as you anticipate it will run.

A) logic
B) syntax
C) run-time
D) scripting

4.

What are the downsides of libraries?

5.

You are not allowed to have any other statements on the same line as the if statement.

A) True
B) False

6.

To ensure that loops execute correctly, you must include code that changes the value of the conditional expression.

A) True
B) False

7.

What are the three main functions of JavaScript?

8.

HTML5 is the concept of semantic markup bundled with JavaScript APIs.

A) True
B) False

9.

One example of a logic error is the creation of an infinite loop.

A) True
B) False

10.

Which of the following statements uses correct syntax?

A)
  <input type = "button" clicked a button")>   

B)
  <input type = "button, onclick

Explanation / Answer

1) A

2) C

3) B

4) If we use the Libraries in the java script code then it include's quite a lot of code that your indivisual web pages don't actually use.
so writing your own code that does exactly what you need and nothing more would be more efficient.

5) B

6) A

7) a) It allow client-side scripts to interact with the user.
b) to control the browser.
c) To communicate asynchronously.
d) alter the document content that is displayed on the web browser.

8) A

9) A

10) A

11) A

12) D

13) A

14) A

15) B

16) B,C

17)

a) You should not use any of the JavaScript reserved keyword as variable name.
For example, break or boolean variable names are not valid.

b) JavaScript variable names should not start with a numeral (0-9). They must begin with a letter or the underscore character.
For example, 123test is an invalid variable name but _123test is a valid one.

c) JavaScript variable names are case sensitive.
For example, Name and name are two different variables.


18) A

19) Global Varibles can be declared as following ways

a) var globVariable = "i am global"; //Global variable declaration


Now You can use this 'var' in any where in your javaScript code.

Note:

variables are declared with 'var' keyword

b) Another way to declare global variable

var window.globVariable = "i am global"; //Global variable declaration with window.

  
use this variable in anywhere of code.

By defining globals this way, you will make JavaScript more robust and reliable.

Note:
Do not use other variables with same name otherwise it may cause unwanted results.

20) Array methods in javascript

length() : it returns the Array length ( i.e Number of elements in array)
reverse() : it reverses the array elements.
indexOf() : it returns the first index of occurance of specified value that contains in an array
it returns -1 if value is not found in Array.

push() : adds one or more elements to the end of an array and returns the new Array length
pop() : Removes the last element from array and returns that element.
sort() : Sorts the array elements.
toString() : Returns a string representing the array and its elements.