JavaScript 1.To ensure that loops execute correctly, you must include code that
ID: 638704 • Letter: J
Question
JavaScript
1.To ensure that loops execute correctly, you must include code that changes the value of the conditional expression. True or False
2.
____ is a combination of JavaScript, HTML, CSS, and the Document Object Model.
TLS
AJAX
SSL
HTTPS
3.
The format for the getElementById() method is ____.
document.getElementById
document().getElementById("element")
document.getId("element")
document.getElementById("element")
4. JSON stores data in the form of objects.
True or False
5. An if...else statement should be used when you want to execute one set of statements if the condition evaluates to true and another set of statements if the condition evaluates to false.
True or False
6.
Which of the following statements uses correct syntax?
A.TLS
B.AJAX
C.SSL
D.HTTPS
Explanation / Answer
1)false
2)B
3)D
4)true
5)true
6)C
7)true
8)Disadvantages of libraries are, in my mind, few. However, there has been much upheaval in the information sciences since the digital takeover of information. Now that things like music, articles, and books themselves are increasingly appearing in digital form, a place where thousands of hardcopies are housed may soon seem ludicrous. Only time will tell of the new role that libraries will play in the sharing of information. Perhaps the libraries of the future will be computer labs that allow the user to access an e-book for a limited period of time at no charge?
9)A
10)D
11)true
12)cookies
13)D
14
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.
15
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.
16
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.
`17
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.
18)true
19)ttrue
20)logic
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.