![]() ![]() ![]() ![]() As well, given JavaScript is not a compiled language, these linters can find bugs that may appear at runtime before you execute said code. Some popular JS linters include ESLint and JSHint. A linter is a program that has a collection of these rules to define how the code should be written and tells you if you wrote something that differs from it. With this, it may be good to set up a set of rules to state how the code should be structured. JavaScript allows you to write things in a variety of ways that still allows you to get the same end result. On the other side, the second example is on one line, uses double quotes and has a semicolon. the first example is split across two lines, has single quotes around the string, and there is no semicolon at the end. Functionally speaking, they both print out “hello world” to the console, but they look different in a variety of ways. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |