Some Core JavaScript Concepts

Sahadat Hossain
2 min readMay 8, 2021

In this article, I will summarize some core JavaScript concepts.

JavaScript try and catch

A try & catch used to handle errors in JavaScript. At first, execute the code that contains in the try. If there no error avoid catch(err) block. An error occurred in the code then execute the catch(err) block and stop the try block.

try and catch example

Error Object: When an error occurs, JavaScript generates an object containing the details about it. Every error object has main two properties:

1. Name: Error name

2. Message: Error Details

There are non-standard properties available

  1. Current call stacks: Used for debugging purpose.

JavaScript Comments

JavaScript comments can be used for explained code that is ignored by the interpreter. There are two types of comment
1. Single line comment: Single line comments start with //.

Single Line JavaScript Comment

2. Multiline Comment: Multi-line comments start with /* and end with */.

Multi Line JavaScript Comment

Cross Browser Testing

Cross-browser testing used for comparing and analyzing the behavior of the different browsers, IOS, and devices.
1. Different Browser: Popular browsers like google chrome, firefox, edge, safari, IE.
2. Different OS: popular operating systems like Windows, macOS, iOS, and Android.
3. Different Devices: Users can view your website with different devices like desktop, laptop, smartphone, tablet.
4. Assistive Tools: Assistive tools used for differently-abled people who are with assistive technologies like screen readers.

--

--