Some JavaScript Interview Questions You Should Know

S M Sabir
1 min readMay 8, 2021

When you are looking for an Internship or junior JavaScript Developer position. You should know some basic JS topics and exercises.
In this article, we’ll learn some topics that often asked in the interview.

What is JavaScript?
Javascript is a text-based programming language that can be used both client and server-side. JavaScript gives interactivity in the Front End of a website that engages users. Developers can also create servers using Node.js.

Truthy and Falsy Values
For numbers: 0 is a falsy value. and att the numbers < 0 & numbers > 0 is truthy values.

String: const string = ‘’; // no character inside quotation mean falsy value.
Any character including white space inside quotation will make the string truthy.

If variable not defined. That is a falsy value.

if we set anything to null or NaN, that is also falsy value.

Setting true / false boolean. True is truthy and false is falsy.
However, if we set: const string = “false”. // it will be truthy as the false inside quotations and counts as a string.

Null vs undefined

Undefined means there is no value set or passed in a general sense.

For example:
const value;
empty

--

--

S M Sabir

Junior Full Stack JavaScript Developer and Integrated Engineer