Basic JavaScript and Browser Information that you should know.

Cross Browser.

Cross Browser is a testing process there a website or a web apps is tested in different browser,
different website, different device and find out the bugs.

JavaScript Errors.

Somehow every programmer makes some mistake when he/she makes instruction then occurs an error.
if an error occurs JavaScript has a default error catch system.

The system is try, catch, throw and finally.

The try statement give you test a block of code for errors.

The catch statement give you handle the error.

The throw statement give you create custom errors.

The finally statement give you execute code, after try and catch, regardless of the result.

Browser Cache

The Browser cache is a temporary storage location on your computer for files download by your browser
to display websites. Files that are cached locally include any documents that make up a website.


Coding-style is very important for a good programmer because code will be seen many other programmer. if the code
is not readable other programmer can not understand the code. That's why coding-style is very important.
there some roles for coding-style.
1.Curly Braces
2.Line Length


Commenting is a good symbol for a good programmer because every code has a explanation. If you explain a code
it becomes more readable and understandable.

JavaScript has two ways for commenting.

1.Single-line comment
2.Multi-line comment

Block Bindings

Binding is variable. When we declare or initialize a variable it binds a value to a name inside a scope and
Block usually refers to a specific part of a program.

Block-Level Declarations.

Block-level declarations are those that declare variables that are inaccessible outside of a given block scope. Block scopes are created:
1.Inside of a function
2.Inside of a block (indicated by the { and } characters

Block Binding in Loops.

Maybe one area where developers most want block level scoping of variables is within loops, where the throwaway counter variable is meant to be used only inside the loop.
For instance, it’s not uncommon to see code like this in JavaScript:

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

Global Block Bindings.

Other way in which ‘let’ and ‘const’ are different from ‘var’ is in their global scope behavior.
When ‘var’ is used in the global scope, it creates a new global variable, which is a property on the global object (window in browsers).
That means you can accidentally overwrite an existing global using ‘var’, such as:

var RegExp = “Hello!”;

Emerging Best Practices for Block Bindings.

While ECMAScript 6 was in development,
there was widespread belief you should use let by default instead of var for variable declarations.
For many JavaScript developers, let behaves exactly the way they thought var should have behaved,
and so the direct replacement makes logical sense.
In this case, you would use const for variables that needed modification protection