But First You Could Follow Me On Dev.to and Twitter
This is one of the easiest question that you can get, but the interviewer expects you to give the most simplified answer you can give on this question.
The answer should be -
3.Write the code for adding new elements dynamically?
It is a very simple question, Click here to get the answer.
Timers are used to execute a piece of code at a set time or repeat the code in a given interval. This is done by using the functions set Timeout, set Interval, & clear Interval.
Variable typing is used to assign a number to a variable. The same variable can be assigned to a string.
i = 10;
i = "string;"
The closure is a locally declared variable related to a function that stays in memory when it has returned.
FACT - This question doesn't really feels important but actually it is.
8.What are the pros and cons object-oriented programming?
It’s easy to understand the basic concept of objects and easy to interpret the meaning of method calls. Object oriented programming tends to use an imperative style rather than a declarative style, which reads like a straight-forward set of instructions for the computer to follow.
object oriented programming Typically depends on shared state. Objects and behaviors are typically tacked together on the same entity, which may be accessed at random by any number of functions with non-deterministic order, which may lead to undesirable behavior such as race conditions.
The answer of this question is - Wait for it -
Inner HTML content is refreshed every time and thus is slower, because of this there is no scope for validation in inner HTML. Therefore, it is easier to insert rogue code in the document and make the web page unstable.
There is a pretty long answer of this question-
Karma: Karma is an open-source productive testing environment. Easy workflow control running on the command line. Offers the freedom to write the tests with Jasmine, Mocha, and QU nit. You can run the test on real devices with easy debugging.
Hey Guys, please subscribe to my newsletter,
Or Donate, if you want- CLICK HERE TO DONATE