Today we discuss JavaScript interview questions

  1. What is JavaScript? JavaScript was first known as LiveScropt, but Netscape changed its name to JavaScript. JavaScript is a scripting or programming language. JavaScript can update and change both HTML and CSS and can calculate, manipulate and validate data. JavaScript is mainly used for web-based applications and web browsers.
  2. What are Truthy and Falsy values in JavaScript?

Answer: Truthy and False values are the boolean expressions. Where truthy are expressions that evaluate to a boolean true value and falsy evaluates to boolean false value.

There are only 6 types of falsy values in JavaScript:


Some fundamental concepts of React JS are described below

React: Rect is a library or a framework? What do you think? React is not a framework it’s a JavaScript library. React is defined as a JavaScript library for building user interfaces. If you want to build a user interface, then React will help to build user interfaces using components. React is simple and it’s extremely easy to mix it with other 3rd party libraries. React is used to build single-page applications. React is a component based and it allows us to create reusable UI components.

Components: React is component-based. Components…


Today we discuss some important things for JavaScript like coding style, comments, arrow function, and so on.

Coding Style: Clean code uses is very important in JavaScript because it’s easier to read and understand.Some coding standards of javascript.

1. Variables and function names must be camelCase.

2.Always try to use const and let instead of var.

3. Always use semicolons(;).

4.Use curly brace in the same line after space.

5.Use a space between parameters.

6.Don’t use space between the function name and parentheses.

7. Use Spaces around operators

8.Use colon plus one space between each property and its value.

9.Use…


List of some string & number method

  1. concat(): If you want to add two or more strings, then you should use concat() method. This method returns a new string without changing the existing string.

syntax:

string.concat(string1, string2,string3…..,stringY)

example:

const first = ‘Beautiful’;
const second = ‘Bangladesh’;
console.log(first.concat(‘ ‘, second));
//output: “Beautiful Bangladesh”

2. charAt(): If you have a string and want to know the index number of a specific character, then you should use the charAt() method. Index of the first character is 0.

syntax:

string.charAt(index)

example:

const string= “Beautiful Bangladesh”;
const result = string.charAt(5);
console.log(result);
//output: “i”

3. endsWith()…

Rashedul Karim

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store