Java

Some of my Past JavaScript Interview Questions with Answers.

These were the answers that I gave and please don’t follow this word by word. There are better resources that you can use.

Shared it as I think this might be fun or helpful for someone.

Question: Why did you apply for a job that also has JavaScript as the requirement?

Answer: In my mind I was like why are you asking this (“Your company had that requirements so” but I smiled and answered it this way.

Well, short and best way would be to point out important feature:

  1. Used for both client-side and server-side development.
  2. Object-oriented programming abilities is very much supported.
  3. JavaScript is the best option to manipulate HTML pages.

Question: You pointed out you have Java skills too. How do you differentiate these two?

Answer: Right. Yes, I have been more involved in Java side of programming than JavaScript. But If I were to differentiate then it would be these.

  1. Java is a programming language but JavaScript is a scripting language but in higher level same concept of coding applies.  
  2. Being worked in enterprise level I had to use more of Java as our applications need virtual machine.
  3. Java is compiled whereas JavaScript is in general text form.

Question: You said Java is being used more in your company then they don’t use JavaScript?

Answer: Well, Not actually. We use Node.js and Electron (Back on my head, please don’t ask me details on Electron) if we need to develop standalone applications. It is just that in a team I was assigned more of Java code but yes I have been exposed to JavaScript based on our JIRA board Stories.

Question: Is Object a Data Type of JavaScript?

Answer: Yes

Question: Is Null a Data Type of JavaScript?

Answer: Yes

Question: Is Symbol a Data Type of JavaScript?

Answer: Yes

Question: Is Symbol a Data Type of Java too?

Answer: As far as I know not.

Question: What is Vertical Tabulator?

Answer: If I am correct it belongs to some form of escape character.

You know the “slash and then v (small letter)”.

Tried explaining in words but I don’t think he understood.

  • \v -> Vertical tabulator

Question: What built-in method do you use to return the last element in JavaScript?

Answer: Following are some of the inbuilt methods in JavaScript:

  • pop – Removes and returns the last element from an array

Question: What built-in method do you use to search for a match in the string parameter in JavaScript?

Answer: Following are some of the inbuilt methods in JavaScript:

  • exec – Searches for a match in the given string parameter

Question: What debuggers do you use for JavaScript?

Answer: I use Google Chrome.

Question: What do you delete a cookie?

Answer: Usually set the expiration date to a time that’s already past.

Why usually?

“I meant not literally. That’s the only one I have used or know of”.

Question: What do you mean by Event Bubbling?

Answer: It is a process that gets the innermost element first and then propagated to the outermost element.

There was some whiteboard coding which I do not remember as the other part I had it recorded on my phone during interview.

Leave a Reply

Your email address will not be published. Required fields are marked *