Sign in

JavaScript

  1. What is truthy and falsy value of JavaScript?

To declare condition, if the value of condition becomes 0, empty string, undefined, null, Nan or false then it call Falsy Value.
On the other hand, if the value of condition becomes not an empty string, array or object then it calls truthy value.

2. What is undefined vs null?

If we don’t define, return or set any value and property of any variable, function, object the result will be undefined.
Null means empty, not existence. It expresses a lack of identification, indicating, that a variable points to no object.

3…


React

  1. What is React? : React is called as a library of javascript which is building user interfaces. It offers nice solutions to some of front-end programming’s most persistent issues, allowing us to build dynamic and interactive web apps with ease. It’s fast, scalable, flexible, powerful, and has a robust developer community that’s rapidly increasing.
  2. React Skills: We can develop a strong understanding of React’s most important concepts: JSX, class and function components, props, state, lifecycle methods, and hooks. we can be able to combine these ideas in React’s modular programming style.
  3. React JSX: This syntax tag is not string…

Syntax, Comments

  1. Syntax: What the name of all things of a javascript function. Everything is in the picture;

2. Comments: If we want to hide any word or line, we can comments it. Example:
function showPrimes(n) {
nextPrime: for (let i = 2; i < n; i++) {
// check if i is a prime number for (comments)
(let j = 2; j < i; j++) {
if (i % j == 0) continue nextPrime; } alert(i); } }

3. Caching: Caching is a general computer concept that provides efficiency through data availability. The mechanism by which this is accomplished…


Javascript String, Number, Math

  1. indexOf(): In an array or object to find out number or word’s position, we use indexOf. If the indexOf’s value is -1 that means it doesn’t find anything like what is searching. Example:
    const friends =[‘Rahim’, ‘Karim’, ‘Kamal’, ‘Jamal’, ‘Abul]; console.log(friends.indexOf(‘Kamal’));
    Output is: 2;
  2. replace(): If we need to change any word or number in an array or object, we can easily change it by replace() method. Example:
    const comment = “The quick brown fox jump over the lazy dog”; console.log(comment.replace(‘dog’, ‘cat’));
    Output is: ‘The quick brown fox jump over the lazy dog.’
  3. slice(): Sometimes we…

Rahad Ahmed

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