InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What is the parameter of the method Date.parse()?(a) date(b) string(c) datestring(d) stringI have been asked this question in an online quiz.The doubt is from Parsing Values using JavaScript in section Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The correct answer is (C) datestring |
|
| 2. |
How can you dispatch a synthetic event object?(a) dispatchEvent()(b) dispatch()(c) dispatch(Event)(d) eventdispatch()I have been asked this question in class test.My enquiry is from JavaScript Benchmarking and Logging with perfLogger topic in division Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Correct choice is (a) dispatchEvent() |
|
| 3. |
The lexical scooping in JavaScript is based on which of the following?(a) Segments(b) Blocks(c) Functions(d) Entire codeThis question was addressed to me during an interview.Query is from JavaScript Benchmarking and Logging with perfLogger in division Parsing, Benchmarking and Logging of JavaScript |
|
Answer» RIGHT option is (c) FUNCTIONS To EXPLAIN: Lexical scoping (sometimes known as static scoping) is a convention used with many programming languages that sets the SCOPE (range of functionality) of a variable so that it may only be called (REFERENCED) from within the block of code in which it is defined. JavaScript has lexical scoping based on functions but not blocks. |
|
| 4. |
To which of the following object does the print() method belong to?(a) window(b) document(c) hash(d) stringI have been asked this question in an online quiz.My question is from Parsing Values using JavaScript in chapter Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Right OPTION is (a) window |
|
| 5. |
What is the purpose of the url json?(a) Belongs to JSON object(b) Reference JSON formatted data(c) Belongs to JSON(d) Compiles json dataThis question was addressed to me during a job interview.The question is from Parsing Values using JavaScript topic in chapter Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Right choice is (b) Reference JSON formatted data |
|
| 6. |
Which of the following method loads a new document?(a) location.new()(b) loadnew()(c) location.load()(d) location.assign()This question was addressed to me in an online interview.My question comes from Creating a Shared Configuration File using JavaScript topic in section Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The CORRECT option is (d) location.assign() |
|
| 7. |
When does the defineContentAttribute() method return a false?(a) Data stored in different table(b) Data stored in its own table(c) Data is not stored at all(d) Data is not obtainedI had been asked this question in exam.This is a very interesting question from Crafting the Public API topic in portion Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The CORRECT answer is (B) Data stored in its own table |
|
| 8. |
What is the method used to stop an execution of a method?(a) clearInterval()(b) clearTimeout()(c) both clearInterval() and clearTimeout()(d) clearmethod()I got this question in semester exam.This interesting question is from Creating a Shared Configuration File using JavaScript topic in portion Parsing, Benchmarking and Logging of JavaScript |
|
Answer» CORRECT ANSWER is (c) both clearInterval() and clearTimeout() Explanation: The clearInterval() method is used to STOP further executions of the function specified in the setInterval() method) The clearTimeout() method is used to stop the EXECUTION of the function specified in the setTimeout() method. |
|
| 9. |
What kind of an exception will be thrown if the string to parse is not valid JSON?(a) SyntaxError(b) ArrayOutOfBoundException(c) Both SyntaxError and ArrayOutOfBoundException(d) Compilation errorI got this question in exam.My question comes from Parsing Values using JavaScript topic in division Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The correct answer is (a) SYNTAXERROR |
|
| 10. |
Which of the following JavaScript logging tool is standalone?(a) Blackbird(b) Log Hound(c) jsTracer(d) fvloggerThis question was addressed to me in class test.This interesting question is from Remote Logging in portion Parsing, Benchmarking and Logging of JavaScript |
|
Answer» CORRECT answer is (b) Log HOUND For EXPLANATION: Log Hound is a tool that was designed for finding frequent patterns from event log DATA sets with the help of a breadth-first frequent itemset mining algorithm. LogHound can be employed for mining frequent line patterns from raw event logs, e.g. Log Hound is a standalone JavaScript logging utility that allows you to log messages during execution of JavaScript code. |
|
| 11. |
How many arguments does the getInputHtml() accept?(a) 1(b) 2(c) 3(d) 4I got this question in homework.My doubt stems from Crafting the Public API in portion Parsing, Benchmarking and Logging of JavaScript |
|
Answer» RIGHT CHOICE is (b) 2 For explanation: The method GETINPUTHTML() returns a fieldtype’s input HTML. The method getInputHtml(0 ACCEPTS two arguments: $name and $value. $name is the name you should assign your HTML input name= attribute, and $value is the field’s current value (EITHER from the DB, or the POST data if there was a validation error). |
|
| 12. |
Which is the method used to process on the input post data before it is saved to the database?(a) prep()(b) settings()(c) defineSettings()(d) prepSettings()I had been asked this question by my college director while I was bunking the class.My query is from Crafting the Public API in chapter Parsing, Benchmarking and Logging of JavaScript |
|
Answer» RIGHT answer is (d) prepSettings() Easiest EXPLANATION: defineSettings() METHOD returns an array whose keys define the setting names, and values define the parameters (the type of value, etc). If you need to do any PROCESSING on your SETTINGS’ post data before they’re saved to the database’s content table, you can do it with the prepSettings() method. |
|
| 13. |
What does the method defineSettings() return?(a) Array of settings name(b) Array of hash key(c) Array of strings(d) Array of objectsThe question was asked in an online quiz.Asked question is from Crafting the Public API topic in section Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Correct answer is (a) Array of settings name |
|
| 14. |
What is necessary when we need to create a new field in craft?(a) Type of the input(b) Type of the output(c) Type of the field(d) Type of argumentThis question was addressed to me during an interview for a job.My question is from Crafting the Public API topic in portion Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Right answer is (C) Type of the field |
|
| 15. |
What will be the radix value of the parseInt()method when the string begins with 0?(a) 6(b) 7(c) 8(d) 9The question was asked during an internship interview.My query is from Parsing Values using JavaScript in portion Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Right answer is (c) 8 |
|
| 16. |
What is the purpose of the method ActiveXObject()?(a) Used to call automation object(b) Used to reference automation object(c) Used to instantiate automation object(d) Used to call & reference automation objectThe question was posed to me in an international level competition.I would like to ask this question from Parsing Values using JavaScript in portion Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The correct answer is (c) Used to INSTANTIATE AUTOMATION object |
|
| 17. |
What is the function of the XML parser?(a) Converts XML document to XML DOM object(b) Converts XML DOM object to XML document(c) Converts XML DOM object to a comment(d) Compiles the html documentThe question was asked in unit test.The origin of the question is Parsing Values using JavaScript in chapter Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The correct choice is (a) Converts XML DOCUMENT to XML DOM OBJECT |
|
| 18. |
How many parameters does the API accept?(a) 5(b) 6(c) 7(d) 8I had been asked this question during an interview.Question is taken from Creating a Shared Configuration File using JavaScript in chapter Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Correct choice is (d) 8 |
|
| 19. |
Where does the external process save the result of the test?(a) Normal file(b) Flat file(c) Folder(d) .exe fileThis question was addressed to me in class test.My question is based upon JavaScript Benchmarking and Logging with perfLogger topic in section Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Right CHOICE is (B) Flat file |
|
| 20. |
What will happen if the fvonly parameter is set to 1?(a) Results got for the first view(b) Can run the repeat view test(c) Running the test again(d) Ending the testI have been asked this question in an interview for job.Enquiry is from Creating a Shared Configuration File using JavaScript in portion Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Right choice is (a) Results GOT for the first view |
|
| 21. |
What will be the radix value if the string begins with 0x?(a) 13(b) 14(c) 15(d) 16This question was addressed to me during a job interview.The origin of the question is Parsing Values using JavaScript in chapter Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The correct CHOICE is (d) 16 |
|
| 22. |
Which function is used to start the time logging?(a) startTimeLogging()(b) start()(c) Loggingstart()(d) startLogging()I got this question during an interview for a job.I want to ask this question from JavaScript Benchmarking and Logging with perfLogger in division Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The correct choice is (a) startTimeLogging() |
|
| 23. |
What is the significance of the JavaScript logging library log4javascript?(a) Fully featured(b) Easy to use(c) Fully featured and easy to use(d) Easily accessibleI got this question during an interview.I'm obligated to ask this question of Remote Logging topic in division Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Correct CHOICE is (c) Fully featured and easy to use |
|
| 24. |
Which of the following JavaScript logging tool is also a debugging tool?(a) Blackbird(b) Log Hound(c) jsTracer(d) fvloggerThis question was addressed to me in an interview.I would like to ask this question from Remote Logging in section Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Correct choice is (C) jsTracer |
|
| 25. |
Which of the following are JavaScript logging library?(a) log(b) loglevel(c) leveljavascript(d) jslogjavaThis question was posed to me in examination.This interesting question is from Remote Logging in portion Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Correct choice is (b) LOGLEVEL |
|
| 26. |
What is the return type of the method parseInt()?(a) String(b) Float(c) Integer(d) DateI have been asked this question by my school principal while I was bunking the class.My question comes from Parsing Values using JavaScript topic in section Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Correct ANSWER is (C) Integer |
|
| 27. |
How many default number methods are available in JavaScript?(a) 5(b) 6(c) 7(d) 8This question was addressed to me in an interview for internship.The origin of the question is JavaScript Benchmarking and Logging with perfLogger topic in division Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Right ANSWER is (C) 7 |
|
| 28. |
Which is the function in JavaScript that will print the current page in JavaScript?(a) print()(b) printcurrent()(c) print(now)(d) print(this)I got this question in an online quiz.My enquiry is from Parsing Values using JavaScript topic in division Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The correct answer is (a) print() |
|
| 29. |
What is the necessity to create a separate file after having an API key?(a) To hold configuration information(b) To hold key details(c) To hold URL details(d) To hold the speed of the processI have been asked this question in semester exam.Question is from Creating a Shared Configuration File using JavaScript in chapter Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The CORRECT option is (a) To hold configuration information |
|
| 30. |
What will happen if the radix parameter of the parseInt() function is omitted?(a) Runs in assumption(b) Throws exception(c) Aborts(d) Taken as 0The question was asked during an interview.This is a very interesting question from Parsing Values using JavaScript topic in section Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Correct ANSWER is (a) Runs in assumption |
|
| 31. |
How many reserved words are there in JavaScript?(a) 63(b) 54(c) 68(d) 90I have been asked this question in an internship interview.Enquiry is from Creating a Shared Configuration File using JavaScript in section Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The CORRECT choice is (a) 63 |
|
| 32. |
Which of the following browsers support the usage of the JavaScript logging library log4javascript?(a) IE(b) Safari(c) Opera(d) All of the mentionedThis question was addressed to me by my school principal while I was bunking the class.Query is from Remote Logging topic in portion Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The correct choice is (d) All of the mentioned |
|
| 33. |
Which function is used to stop the time logging?(a) stopTimeLogging()(b) stop()(c) finish()(d) abort()I got this question in an interview.Question is from JavaScript Benchmarking and Logging with perfLogger in division Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Right option is (a) stopTimeLogging() |
|
| 34. |
What is the observer effect?(a) Observing influences outcome(b) Observing never influences outcome(c) Observing and the outcome are independent(d) Observing and the outcome are not relatedThis question was addressed to me during a job interview.This intriguing question originated from JavaScript Benchmarking and Logging with perfLogger topic in chapter Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The correct answer is (a) OBSERVING influences outcome |
|
| 35. |
What is the purpose of the window.location object in JavaScript?(a) Get the URL and redirect(b) Get the location of the cursor(c) Get the path to the next page(d) Get the location & path of the next pageThis question was posed to me during an interview.I need to ask this question from Creating a Shared Configuration File using JavaScript in chapter Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The correct choice is (a) Get the URL and redirect |
|
| 36. |
What is the purpose of the adoptNode() method?(a) Removes node(b) Makes it ready for insertion(c) Removes node and Makes it ready for insertion(d) Changes the nodeThis question was posed to me in an online quiz.This interesting question is from JavaScript Benchmarking and Logging with perfLogger in portion Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The CORRECT answer is (c) Removes node and Makes it READY for INSERTION |
|
| 37. |
How many events does the BaseFieldType provide?(a) 1(b) 2(c) 3(d) 4The question was asked by my college director while I was bunking the class.This intriguing question comes from Crafting the Public API topic in division Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The correct answer is (c) 3 |
|
| 38. |
What is the return data type of the property accept that belongs to the Input element?(a) integer(b) string(c) boolean(d) floatThe question was asked during an interview for a job.Question is from JavaScript Benchmarking and Logging with perfLogger topic in section Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Correct ANSWER is (b) string |
|
| 39. |
How can you create a node for comment in JavaScript?(a) comment()(b) createComment()(c) comm()(d) create()I got this question at a job interview.Query is from JavaScript Benchmarking and Logging with perfLogger topic in section Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Right answer is (b) createComment() |
|
| 40. |
Which of the following is a JavaScript Compressor?(a) Esprima(b) UgilifyJS(c) Acron(d) CompressifyThis question was posed to me during an interview for a job.The above asked question is from Parsing Values using JavaScript topic in division Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Right choice is (b) UgilifyJS |
|
| 41. |
What is the purpose of the radix parameter in the parseInt() method?(a) Numeral system not to be used(b) Numeral system to be used(c) Conversion mode(d) Parsing modeI got this question during an interview.I need to ask this question from Parsing Values using JavaScript in portion Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The correct choice is (b) NUMERAL system to be used |
|
| 42. |
What is the function of the parseInt() method?(a) Parses a data type and stores in an integer(b) Parses a string and returns an integer(c) Parses an integer and returns a string(d) Parses a string and return an objectThis question was posed to me in semester exam.I want to ask this question from Parsing Values using JavaScript in division Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The correct option is (B) Parses a string and returns an INTEGER |
|
| 43. |
What does the getInputHtml() return?(a) Input(b) Fieldtype’s input HTML(c) Array(d) ValueI got this question during an interview.I'd like to ask this question from Crafting the Public API topic in division Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The correct choice is (b) Fieldtype’s input HTML |
|
| 44. |
What is the purpose of the UgilifyJS?(a) Exposes a simple API(b) Minification(c) Both Exposes a simple API and Minification(d) CompilationThe question was posed to me in semester exam.This interesting question is from Parsing Values using JavaScript topic in chapter Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Right option is (c) Both EXPOSES a simple API and Minification |
|
| 45. |
What are the parameters of the method JSON.parse()?(a) text(b) reviver(c) both text and reviver(d) objectI have been asked this question in semester exam.Enquiry is from Parsing Values using JavaScript topic in section Parsing, Benchmarking and Logging of JavaScript |
|
Answer» RIGHT answer is (c) both text and reviver To EXPLAIN: The JSON.parse() method can optionally transform the result with a function. The parameters of the method JSON.parse() are : text : The string to parse as JSON. reviver : If a function, prescribes how the VALUE originally PRODUCED by parsing is transformed, before being returned. |
|
| 46. |
Which of the following method will wait for certain milliseconds to execute a specified method?(a) setInterval()(b) setTimeout()(c) setmilli()(d) setseconds()I got this question in exam.Enquiry is from Creating a Shared Configuration File using JavaScript in division Parsing, Benchmarking and Logging of JavaScript |
|
Answer» RIGHT option is (a) setInterval() The EXPLANATION is: The setInterval() method CALLS a function or evaluates an EXPRESSION at specified intervals (in MILLISECONDS). The setInterval() method will wait a specified number of milliseconds, and then execute a specified function, and it will continue to execute the function, once at every given time-interval. |
|
| 47. |
What is the purpose of the parameter $value?(a) Field’s expected value(b) Field’s previous value(c) Field’s current value(d) Field’s probability valueThe question was asked during a job interview.The above asked question is from Crafting the Public API in chapter Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Right option is (C) Field’s current value |
|
| 48. |
What is not the purpose of the parameter location?(a) Specifies agent location(b) Specifies speed(c) Specifies browser(d) Specifies blockI have been asked this question in an internship interview.My question comes from Creating a Shared Configuration File using JavaScript in chapter Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The correct choice is (d) Specifies block |
|
| 49. |
What is the purpose of the property width belonging to the ImageData element?(a) Number of data(b) Number of pixels(c) Number of pixels per row of data(d) Number of columnsThis question was addressed to me in exam.I want to ask this question from JavaScript Benchmarking and Logging with perfLogger topic in chapter Parsing, Benchmarking and Logging of JavaScript |
|
Answer» Correct choice is (c) Number of pixels per ROW of data |
|
| 50. |
Which of the following reads the textual contents of a URL and returns as a string?(a) spawn(f);(b) load(filename,…);(c) readFile(file);(d) readUrl(url);This question was addressed to me at a job interview.Query is from Remote Logging topic in chapter Parsing, Benchmarking and Logging of JavaScript |
|
Answer» The correct choice is (d) readUrl(url); |
|