Why should choose Poseidon Network?

In the world there are many decentralized CDN service providers and Poseidon Network is one of them. This decentralized version is usually divided into two groups, namely groups to be used by…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




BlogPost 202 Javascript!

The thing I most enjoyed learning in class today was how to think through a problem like with coding the tictactoe. Working through it on the whiteboard, then in pseudo code, and finally in real code helps me understand how to break things down into small steps and get there piece by piece.

“Use strict” is a way of signaling that you want strict adherence to javascript rules, such as not allowing unnamed variables. It is useful, especially when dealing with a lot of code, as it can keep you from getting sidetracked trying to track down small mistakes that were able to slip by if you don’t use the “use strict” expression.

Hoisting is Javascript’s default behavior of moving all declarations to the top of the script. This means variables declared after functions can be used in them.

Standards bodies publish the standards regarding documentation and language usage that make web developers’ jobs much easier. Without standards, it can become much more difficult to understand the code of others, as there isn’t a set of standards by which things should be written.

The two best ways I have increased the maintainability of my code is by solving the problem and coding it, and then going back and seeing if there is a more efficient way to do so requiring less code. The other is by being careful to declare my variables with const when appropriate.

It is possible to extend javascript built-in functions by using prototype. Prototype lets us insert our custom functions into a JS object. An example of a a built-in function is .slice(). If you extend built-in functions it can cause problems down the line if javascript adds its own function similar to what you have built, or if you modify current ones it breaks their behavior and can make it difficult for other people to troubleshoot your code.

Global scope effects all the code that follows it on individual pages, so variables that you can’t see locally can be effecting your code, without an easy way to see and troubleshoot them. You are likely to encounter global variable name clashes, and it can appear as a corner-cutting attempt that makes future work much more difficult.

Add a comment

Related posts:

2022 Top Product Management Book Sales

Here at Getting Started in Product, we run a bookstore that stocks a variety of books focused on the world of product management; from direct product management books like Inspired by Marty Cagan to…

How to boost engagement using photo filters like a pro

Selfies with bunny ears and neon rainbow washes are nice, but your photo filters can do so much more — such as turbocharge the engagement and visual impact of your data. While most people are…

Choro Preto

Escorre entre os meus dedos Pois eu sou todo este mar Sou o pixe desta praia Luto e não paro de lutar E nas preocupações do seu bolso Eu não sou nem a lembrança Pois vale mais uma piada de mau gosto…