Let’s have a quick tour with JavaScript part 2

Shadman Shuvo
2 min readMay 6, 2021

JavaScript Data Types
There have 7 data types of JavaScript.
- Number
- String
- Boolean
- Undefined
- Null
- Symbol
- Object
We can also categorize these data types by primitive and non-primitive.

Primitive Data Types
- Primitive refers to a single value that won’t change in the browser.
Number, String, Boolean, Undefined, Null, Symbol are primitive data types.
Example:
const value = 200;
const name = “Shadman”;

Non-Primitive Data Types
- Non-primitive refers to multiple values that will change in the browser by the manipulation of the programmer.
Example:
const student = {name: “Shadman”, age: 26};

Expression
- Expression can be single or multiple instructions that will assign a single value.
Example:
value1 = 10;
value2 = 10 + 20;

Checking Data Type
- We can check a data type by using a function/ expression.
Example:
typeof(10);
typeof(“Shadman”);

Comments
- We can write some comment in the code for understanding what is going on in the code
Example:
const number = 10; // Here, the value of the variable is 10

Coding Style
- Code must be neat and clean. We need to use proper spacing, commenting, semicolon
Example:
const value = 10 + 20; // value = 30

Error Handling
- Error handling is a special type of syntax for find the error instead of stopping the script immediately
Example:
try{code}
catch(err){code}

Cross Browser Testing
- Cross-browser testing refers to the acceptance and performance of the code in various browsers. Mainly we need to focus on the viewer's experience. It depends on HTML, CSS and JavaScript code.

Why Cross Browser Issues Occurs?
- Every browser uses its own strategy, technology and implements features differently. For this, conflicting issues arise.

--

--