about 10 things As a web developer, you need to know
Web development is the most popular profession in the world at this moment. a web developer should maintain and organized his/her code to be more readable. so you can follow these 10 things to organize your code. it's very important for a web developer or programmer.
1.comment: if you want to your code more readable and understood you must need to do a comment beside the code.it will be helpful to another developer to maintenance and updating the code. every programming language has two types of comments. one is single-line comments and the second is multiline comments. a single-line comment is written by double (//) slash and a multi-line comment written by /**/. for example:
// I am a single-line comment.
/ I am a double-line comment. you can use me one more line in the comment block. /
- Semicolon: emicolon (;) is a very important thing in any programming language. if you use the semicolon end of the code block that means here is the end of this code block. some programming language must need to use semicolons end of the statement.in javascript some cases you can ignore it. but best practice is to use semicolons end of the statement. for example: var name = 'Sohel Rana '; // good practice let age = 20 // bad practice.
3.try and catch: as a web developer almost time you face error in you coding time. then you must need to solve or fix these errors. that's mean you just need to know how to handle errors in programming. you can fix any error by try and catch to detect what is the reason for showing the error. for example: try{ // code block here }catch{ // error handleling }
4.code formating: if you can much coding it's doesn't matter. your code is how professional it matters. code formatting is important to be more readable in your code.so every developer or programmer should maintain their code formatting. if you want to do that code will be automatic formatting then you can use JSLint or ESLint.
5.Crose Browser compatibility: as a web developer must have knowledge about cross-browser compatibility. otherwise can't do much better and satisfied user in you developer life. close browser compatible means your website or web application be run properly in the most to the browser and user feel comport to use application.
6.DataTypes: datatype is very important to do programming. programming means you must need to use data in your program.so if you don't know about data type in programming then you can't do good in your programming journey. so as a developer you must have knowledge about datatype.
7.variable declaration: variable declaration is most important in programming. you can declare variable three keywords in javascript. like var, let, and const. var is global scope variable keyword, let block scope variable keyword and const no changeable or updatable value.
8.Dev tools: as a web developer, you must need to know developer tools to fix an error or modify your code. dev tools do programming coding life easier. so can learn more about it.
9.shortened coding: shortened coding is very good for application performance. you can try to use it in your program. but you should do the documentation for the shortened code.
- Arrow Function: arrow function is a very interesting way to declare a function.it comes with es6 version of javascript. it's a simple way to write a function in javascript programming. you can create this function in one line. if you want to use multi-line then you must return value from inside the function. for example:
const treating = ()=> {console.log('welcome to my blog')}