The complete guide for improving your awesome code

During my years of programming, I always prioritized the way to write the code, not only so that it is clean but also because it helps the speed of processing and it is faster to write it.

It is not the same to write 1000 lines of code than 300, this helps a lot to the program or script that we are doing.

You have to be very careful when programming, because in large projects having “dirty” code can be a serious problem.

Many programmers criticize the JavaScript language for not having a standard way of working like Java or C ++ for example but the truth is that Javascript is one of the best languages that are being used in these times, some of them are Facebook and Netflix. Libraries like React among others improve Front-end performance and as for the backend, nextJs is used for greater speed, these combinations drive today’s programmers crazy.

By learning the following tips you will be able to improve the way you write your code. Take your time and practice with the console to learn well.

Let’s do it! 🔥

18 Tips For Writing JavaScript Code Like A Hero

  • Use ‘const’ for the constants instead of ‘var’
  • Use ‘let’ for the changing variables instead of ‘var’
  • Declaring Objects
  • Declaring Arrays
  • Concatenate strings
  • Use object method shorthand
  • Creating the value of an Object
  • Assign values to an Object
  • Assign a value to an Array
  • Concatenate Arrays
  • Get multiple properties of an object
  • Getting values from an object
  • Creating functions
  • Default values
  • Use ‘reduce’ Instead ‘forEach’ and ‘for’ to sum values
  • Exist in array
  • Shortcut if boolean
  • Shortcut if values

#javascript #programming #web-development #developer #react

18 Tips For Writing JavaScript Code Like A Hero
3.30 GEEK