JavaScript core functionalities

Kazi Rahat
4 min readMay 6, 2021

01.What is cross browser testing?

Cross browser testing is non functional testing method where you should check your created website, web apps, pages working properly in different browser properly. As a web developer you should check it and it ‘s your responsibility to make sure that not only do your projects work, but they work for all your users, no matter what browser, device, or additional assistive tools they are using. You need to think about little things:

· Still, lots of people using old browsers where don’t support all the latest, shiniest CSS and JavaScript features.

· Some People with disabilities, who are using the Web with the aid of assistive technologies like screen-readers, or don’t use a mouse and also some people use only the keyboard.

02.What is Block Bindings?

Bindings is when we declare or initialize a variable using let, var, const then we actually bind a value to a name inside a scope. Scope usually refers to a specific part of a program. Here is an example:

var x

let y

const last = z

03.What is Block level Declarations?

A block scope is the area within if, switch conditions or for and while loops. Generally speaking, whenever you see {curly brackets}, it is a block. In ES6, const and let keywords allow developers to declare variables in the block scope, which means those variables exist only within the corresponding block.

Block-level declarations are the ones that declare variables that are far outside of a given block scope. Block scope are created:

· Inside of a function

· Inside of a block which is indicate with curly brackets {}.

04.What is Block Bindings in loops?

Probably one area where most developer wants block level scoping of variables to Declare and initialize a variable inside loops. Hers is an example of this:

for (var i=0; i < 10; i++) {

process(items[i]);

}

// i is still accessible here

console.log; // 10

05.What is Global Block Bindings?

Global Block Bindings is actually where you should use const, let and var, let and const are different from var in their global scope behavior. Var is global variables, it’s creates a new global variable, which is a property on the global object (window in browsers). Here is an example of that:

// in a browser

var RegExp = “Hello!”;

console.log(window.RegExp); // “Hello!”

var ncz = “Hi!”;

console.log(window.ncz); // “Hi!”

06.What is Functions with Default Parameter Values?

Functions with Default Parameter Values is where it’s allows us to initialize functions with default values. If no value is passed or if undefined is passed. First, what happens when no parameter is passed to a function that requires parameters.

function multiply(a, b = 1) {

return a * b;

}

console.log(multiply(3, 2));

// expected output: 6

console.log(multiply(50));

// expected output: 50

Here ‘1’ is a default parameter of this functions. If the function value (a — 3, b — 2) is not passed to a function then the default parameters is required.

07.What is The Spread Operator?

The spread Operator is new features of ES6. It’s commonly used to make shallow copies of JS objects. This spread operator can be used in many cases like when we want to expand, copy, concat, with math object. Let’s see a common example of this operator:

var variablename1 = […value];

08.What is Arrow Functions?

Arrow functions allows us to write or create shorter code syntax than regular functions. It’s a new way to write short functions rather using regular functions. Let’s see an example:

hello = () => “Hello Rahat!”; //Hello Rahat!

Before we use this function it’s important to understand that how the arrow functions behave differently compared to the regular ES5 functions.

09.What is Try-catch error?

A try..catch block is basically used to handle errors in JavaScript. No matter how great we are at programming, sometimes our scripts have errors and it’s made so much panic if the error is not found. The try… catch blocks marks a block of statements to try and specifies a response should an exception be thrown. Here is an example:

try {

// code…

} catch (err) {

// error handling

}

10.What is Balancing client and server caching?

Load balancing refers to efficiently distributing incoming network traffic across a group of backend servers, also known as a server farm or server pool.

What is Client-Side Caching?

Client-side caching duplicates the data of previously requested files directly within browser applications or other clients (such as intermediate network caches). Client cache is the most efficient type of caching, because it allows browsers to access files without communicating with the web server.

What is Server-Side Caching?

A server cache is a type cache that’s related to site caching, except instead of temporarily saving content on the client side, it’s stored on a site’s server. Server caching is also fully handled and amistered on the server without any involvement of the end user, or a browser.

--

--

Kazi Rahat

My passion for technology and commitment to staying up-to-date with industry trends will drive my success in this role.