some javascript acknowledgments

Omar Faruq
4 min readMay 6, 2021

--

# Cross browser

Cross-browser testing is the practice of making sure that the websites and web apps you create work across a suitable number of web browsers. As a web developer, it is your charge to make sure that not only do your projects work, but they work for all your users, no substance what browser, device, or additional assistive tools they are using. You need to think about:

Different browsers are other than the one or two that you use regularly on your devices, including somewhat older browsers that some people might still be using, which don’t support all the latest, sparkly CSS and JavaScript features.

Different devices with different capabilities, from the latest highest tablets and smartphones, right down to cheap tablets and even older feature phones that may run browsers with limited competencies.

People with disabilities, who use the Web with the help of assistive technologies like, or don’t use a mouse (some people use only the keyboard).

Remember that you are not your users — just because your site works on your MacBook Pro or high-end Galaxy Nexus.

And also have a different browser such as google chrome, firefox, internet explore, opera, Microsoft edge, etc. so, the hour web application all system supported to have responsive and different browser bases. Another wise hour application is not supported to a different browser.

So, cross-browser is a very important issue for a web developer

#Balancing Client And Server Caching in Web Application Development

— definition: In the online space, many methods are at the same time referred to as “caching” due to their ability to reflect this functionality. In the most simple terms, caching is a normal computer concept that provides effectiveness via data availability. The mechanism via which this is done is via the storage of oftentimes accessed information in several places and then serving that information to requesters from the common information store. This is adverse to producing new content material each time it is requested.

— Client Caching:
Client caches help restrict the information cost incurred via the user by using keeping usually referenced facts locally. The client frequently requests facts that may also now not be large but is certainly always needed.

— Server Caching:
Server caching helps restrict the cost incurred by using the server and its underlying systems. Many requests made by using clients can either bespoke back to using the same data or replied to using components of the equal requests made via others.

data cost and improving efficiency.

To the API, this request looks like this:

a) The consumer makes a request to the API.
b) This request is acquired through the server.
c) The server tests for a nearby replica of the file requested. While this test has d) a cost, the cost is nevertheless extraordinarily low in contrast to the proper e) value of computing a large database test or producing content.
f) If the neighborhood resource exists, the server responds with its resource URI.
g) The client grabs the cached content.
h) If the nearby aid does now not exist, the request is processed normally.

#Comments:

comments are two types:

a) Single-line Comments:
Single-line comments are used to comment on a section of a line or a full line of code in JavaScript. You can use it for both explaining the code or debugging (commenting out to stop the execution by using the browser).

example: “ // This is a Single-line Comments “

b) Multi-line Comments:
JavaScript multiline comment has the equal cause as a single-line comment. JavaScript comment block starts with two symbols: /*. To end the comment, use these symbols */ again. Everything between these symbols will be dealt with as a comment in JavaScript.

example: */…{

} …./*

*** note: good comments: multi-line comments are good comments.

bad comments: single-line comments are bad comments.

#Error handling:

The try declaration lets you check a block of code for errors. The catch declaration lets you manage the error. The throw declaration lets you create customized errors. The eventual assertion lets you execute code, after strive and catch, regardless of the result.

Errors Will Happen: When executing JavaScript code, special blunders can occur. Errors can be coding blunders made by using the programmer, mistakes due to incorrect input, and different unforeseeable things.

JavaScript try and catch:
The attempt declaration approves you to outline a block of code to be examined for blunders whilst it is being executed. The seize announcement approves you to outline a block of code to be executed if an error takes place in the attempted block.

The JavaScript statements strive and catch come in pairs:

example:

try {
try block
}
catch(err) {
catch block

}

#Coding Style:

Our for-good coding follows the following step:

a) Our code must be as clean.

b) of force easy to read as possible.

c) follow the right indention.

d) don't allow extra comments, extra code, extra space.

e) A space between parameters.

f) No space between the feature identity and parentheses between the parentheses and the parameter.

g) Spaces around operators.

h) A semicolon (;) is mandatory.

i) A space between arguments.

j) Lines are not very long.

k) Spaces around a nested bracket.

#JavaScript Primitive & Reference Values

JavaScript has two data types:

a) Primitive types b) Reference types

a) Primitive types:

— It consists of Number, String, Boolean, null, and undefined.
— If we assign a primitive kind to a variable, we can suppose of it as we placing that unique price in a specific reminiscence box.
— When we assign a price of one variable to any other it will be copied into that new variable.

b) Reference types:

— Now you can possibly wager about Reference types. It consists of Array, Object, and Function.
— In the case of Reference sorts Variables truly don’t have the true values however it incorporates a reference to that unique value.
— Here, Reference clearly ability a pointer to some other reminiscence vicinity that holds unique value. This may be sound difficult for you at first look however undergo with me. Once you go via it would be very clear to you.

--

--

Omar Faruq
Omar Faruq

Written by Omar Faruq

my name is omar faruq, I am a student

No responses yet