10 Different thing which helps your thought about javascript

Rabiul Islam
3 min readMay 7, 2021
  1. Primitive value: In javascript datatype primitive is one of them. Primitive value means which data don’t have any object and method. The value can be anything like a number, word, etc. Primitive value has 7 types of data :

(i)String

For example: const first= “He is an honest person.”;
console.log(first)

(ii)Number

For example: var first = 420;
console.log(first);

(iii)Undefined​

For example: const first
console.log(first);

(iv)Null​

For example: var first = null;             console.log(null);          

(v)Booleans​

For example: const first = '';
console.log(Boolean(first));

(vi)Symbols​

For example:const first = Symbol()

(vii)BigInts​

For example:const first = BigInt(9007199254740991)

2.Object: Object types are user-defined data types. like an array, object, and function. We can create any value and connect to our browser. The object and function can also create something special which clickable. If you click then some special or what you want to do you able to do it by coding object and function help of array.

3. Type Checking: In the beginning, you are confused about so many things but at the beginning, you have to know which type of data you try to find out .So that you have to know how to check data type. So you can easily find out which is the string which is number type of data.

For example: console.log(typeof(420)); //number
console.log(typeof("first")) //string

4. Cross-browser testing: Cross-browser testing means checking your website to any browser and any device. So that users can see from any device and any browser at any time.Different browser made by different language or different way so that every browser are not same. So users also use different devices and browsers. So you have to check your website that is able to run any device is called cross-browser testing.

5.Caching: Nowadays caching method is key to all websites. Caching used to save data server site and load client site. Also, access some data from the user.API is a helping hand of caching.API is a key way to manage both site data. This way site will more efficiently work.

6.Comments: Comment is a key thing for a good coder. If your code is good but you are unable to comment out your code then the reader will be in big trouble to read your code. If you comment out each in every section then it’s will be easy to read your code to the reader as well as you can find out your code easily. But you have to think before the comment is a good place to comment out this line or not. Cause bad comment also disturbs reader to read your comment. So use comment wisely.

7.Coding Style: Coding style is a key factor to make the difference between beginner to intermediate to professional. Coding style is like writing as a child your writing knowledge is so tiny at that time. We know nothing about how to arrange a sentence in the proper way. But day by day we know new thing than we are the better version of yourself. So coding style same thing the beginning we are know how to do the proper way we don’t have to. But at a time you have good at coding style. So that your code reader can think which type of coder you are. So at a first, you have to know how it works then you have to know how to beautify code.

8.Error handling: Error handling is a key factor for the coder. If you want to be a good coder then you have to face a lot of errors and you have to solve them to run your code or run your site. Error is a daily routine for a coder every single coder faces it every single day. So if you try to catch the error then you have to write some code inside your code where you face an error. For example :

try {    // code...  } catch (err) {    // error handling  }

9.Event loop: The event loop work by call stack.The event loop help to get the value or result of the function by looping.For example:

function work(second) {let first = 45return first + second + 3}function workit(third) {let fourth = 4return work(third * fourth)}console.log(workit(8))//output 80

10. Data type: Data type is two types. The first one is “primitive” another one is “object”. One is defined by javascript which calls primitive. And the hand object is the user-defined data type. The object data type is more important than the primitive data type. Cause user effect is more effective than the basic effect.

--

--