ExamVeda
Login
Home
31
How many default number methods are available in JavaScript?
Discuss
Answer & Solution
Answer: Option C
Solution:
There are a total of 7 default number methods in JavaScript namely :
1. constructor() 2. toExponential() 3. toFixed() 4. toLocaleString() 5. toPrecision() 6. toString() 7. valueOf()
32
What is an observer effect?
Discuss
Answer & Solution
Answer: Option A
Solution:
The observer effect says that simply observing an act influences its outcome.
33
Which of the following are ways to benchmark code?
Discuss
Answer & Solution
Answer: Option C
Solution:
There are a couple of ways to benchmark code—either by timing it or by calculating the number of operations performed during execution.
34
How to calculate the run time of a code?
Discuss
Answer & Solution
Answer: Option B
Solution:
The run time of a code can be calculated as :
run time = end time – start time
35
According to the workflow of a runtime logging, what happens after calculating the run time?
Discuss
Answer & Solution
Answer: Option C
Solution:
According to the workflow of a runtime logging, after calculating the run time, decision boxes are kept that will check to either display to the debug screen or log to the server.
36
Which of the following object is used to post the data to an external process, say savePerfData?
Discuss
Answer & Solution
Answer: Option C
Solution:
The benchmarking process will call the external process. We use XHR object to post the data to the external process.
37
Where does the external process save the result of the test?
Discuss
Answer & Solution
Answer: Option B
Solution:
The external process, say savePerfData should in turn save the results of the test in a flat file.
38
Which function is used to start the time logging?
Discuss
Answer & Solution
Answer: Option A
Solution:
The function startTimeLogging() is used to start the time logging.
39
Which of the following attribute of form tag is not set by using document object in JavaScript?
Discuss
Answer & Solution
Answer: Option D
Solution:
All of the above can be set by using document object in JavaScript.
40
What type of scooping is present in JavaScript?
Discuss
Answer & Solution
Answer: Option A
Solution:
JavaScript supports lexical scooping that deals with functions instead of blocks.