A little things of Javascript

Md Rishad Khan
3 min readMay 6, 2021

In javascript, there are several types that may be imported.

Primitive Values

The primitive values can’t be changed, and they’ll be the same everywhere. You can’t modify it in your own way, even though you use the built-in functions in js.

var bar = "baz";
console.log(bar); // baz
bar.toUpperCase();
console.log(bar); // baz

Objects and Function

In this scenario, you can go your own way and build whatever you want. You can link values and transfer them from one to the other.

Expression

You can use expressions to answer all of your questions in a mathematical manner. This method will be easy to understand 2–2 = 0 or 2+5 = 7.

Checking Type

You should look into the form of whatever it is.The typeof operator can be used to determine the valuetype of a variable. Like this

console.log(typeof 42);
// expected output: “number”

console.log(typeof ‘blubber’);
// expected output: “string”

console.log(typeof true);
// expected output: “boolean”

console.log(typeof undeclaredVariable);
// expected output: “undefined”

Try ….. Catch

We can “catch” errors in our scripts using the try…catch syntax construct. In most cases, a script “dies” when it finds an error, printing the message to the console.

try{

/………code………/

}

catch(error){

/………..code………./

}

Data Cost

The concept of data cost simply states that any process, feature, and element of what we do with an API creates a cost. This cost can be caused by a number of variables and processes, both on the server and on the client. Caching then helps in cost savings at the most fundamental level by reducing the number of unnecessary calls that produce extra charges.

Client Caching

By saving frequently referenced data locally, caches help users reduce their data costs. For example, if an API provides a user with a directory, the user may cache the directory locally rather than requesting it from the server. All of this contributes to lower data costs by reducing network usage and processor demand.

Server Caching

The same data can be used to respond to a variety of client requests. As a result, the database avoids making a large number of calls that it would otherwise be liable for. This reduces data costs while also increasing client and server performance. It’s also possible to use cached content to synchronize directories and database queries.

Cross Browser Testing

The testing of cross-browsers ensures that sites and applications work across a variety of web browsers. It is your duty as a web developer to ensure your projects are working with all your users.

Workflow of Cross Brower Testing

Testing business with cross browsers can sound timely and frightful, but it does not need to be. You should test it periodically while you are working on a big project. Any bugs you detect are more time consuming and costly to repair than if you detect them and fix them.

Initial planning > Development > Testing/discovery > Fixes/iteration

For cross browser testing, you must follow these things

--

--

Md Rishad Khan
0 Followers

To share my knowledge what i learn from everywhere