The interview is one of your job’s central parts, directly or indirectly affecting your successful career.
Q2: What is mean by scripting language?
Ans: Scripting language means interpreted. It is a programming language that translates into machine code after compilation(code is run).
- Interpreted programming language
- Compatible with java
- Compatible with Html
- Open-source cross-platform
Ans: There are many advantages and disadvantages, but some of them are:
1: Interactivity is high
2: Interfaces are richer
3: Feedback to the visitor is immediate
4: Server interaction is less
1: There is no support for multithreading
2: There is no support for multiprocessing
3: There is no reading and writing of files.
4: Restriction for networking application support.
Q5: What are the names of types of functions?
Ans: The types of functions are:
1) Named: Named types of functions contain names at the time of definition.
2) Anonymous: These functions do not include any name because they declare dynamically at runtime.
Q6: Tell us, Can we assign an anonymous function to a variable?
Ans: Yes, we can assign
Q8: Define closure?
Ans: By these three ways
1) By Array literal
2) By creating an instance of an Array
3) By using an Array constructor.
Q12 : Tell me what is isNaN() function ?
Ans: isNaN() function return true if the variable value is not a number
Ans: The output will be 2021 because if there is a numeric value before and after +, it treats as binary so, 10+10=20 and the “21”.
Ans: The output will be 101021 because, after the string, all + will be considered as string concatenation operator, not a binary.
Q16 : How can you define the difference between == and === operators ?
Ans: The ” == ” operator only checks the equality, and on the other hand, the ” === ” operator checks the equality and data type also.
Ans: Alert box, Confirm box, Prompt box.
Ans: We can use navigator.appVersion string to detect the OS on the client machine.
For debugging, we can use any of the following approaches:
1: Using console.log() method
2: Using debugger keyword