- Interactive maps
- Animation 2D and 3D graphics
- Offer scrolling jukeboxes
- Manage the back-end of a website
- Be creative
You probably know HTML and CSS well enough to understand how websites work and what you can do to improve it. Understanding these tools will show you have the computer literacy necessary to expand your knowledge. This will allow you to skip the more difficult parts and cut down on your learning time by a few weeks.
Let’s start with the basics.
You must plan carefully as the code runs in an ordered order from beginning to ending. It is crucial to place instructions in the correct order. If a few steps are not in the correct order, the script will not work. Instead, you will see an error in your browser developer console. This is the environment where your code is tested.
It’s like showing someone how to tie their shoelaces. It is impossible to tell someone how to tie their shoes until they have put on the shoes. The instructions for tying the shoes will not be given if you don’t give them the details.
- Common features
- Server-side vs client-side
- Dynamic vs. static
- Basic syntax
- Statements and functions
- Operators, values, operators, and expressions
- Objects, primitives, data types, comments and identifiers
Server-side vs. client-side
You may be familiar with the terms server-side or client-side code if you work in web design.
Server-side Code runs on the server. This is the computer that delivers web pages to the browser. The browser displays the results and downloads them. Ruby and Python are two other popular server-side languages.
Dynamic vs. static
A staticwebpage is one that does not change. You only see the page and there is no interaction. For simple pages containing text information and images, you can create static pages with HTML or CSS. You will need to manually rewrite the HTML and CSS layers if you want to make any changes.
Programmers have developed many ways to combine multiple words into one variable name over time. Some programmers use hyphens to separate the words. Some use underscores between terms.
Functions and statements
A computer program is basically a list or instructions that a computer will execute. The instructions in computer programming are known as statements. A function is a collection of statements that perform tasks and calculate values.
A line break separates statements. Example:
x = 3.
y = 6
Keywords are considered reserved words and cannot be used to identify variables.
Some examples of keywords are:
- break – Ends a loop/switch
- is— This block of statements can be executed for as long as the condition is true
- function — declares a function
- return— exits from a function
- switch – This block of statements can be executed in different cases.
- let — declares a variable
Variables, operators, values, and expressions
Variables and fixed values are possible. A literal is a fixed value. Numbers (with decimals or not) and strings are two essential literals. Strings can be text written in double or single quotations.
There are two types of operators. To compute values, arithmetic operators can be used. Take, for example:
(5 + 6) * 10
Assignment operators can be used to assign values for a variable. Take this example:
x = 5
y = 6
Expressionsare combinations or variables and operators that produce a value. evaluation is a method of computing. For example, 5 * 10 equals 50. Variable values can also be included in expressions.
Objects , primitives , comments, and identifiers
These objects include:
- Regular expressions
Comments are not part of the functional languages. They are ignored by the browser and moved to the next line. Comments can be used to provide documentation that will benefit the person reading the program. Comments can be used to explain variables or help maintain and update the program.
Two slashes are required to create a single-line comment. For multiple lines of comments, you can place the comment between * and */. Example:
// Modify Heading
/* This code will modify the heading with the id= “myH” as well as the paragraph with the id= “myP” on my web page:
Consider the other developers who might be following you when updating and maintaining your code. If something isn’t obvious, give them a hand with comments. If you add comments all the time, it could be a sign that your code is too complicated. You might need to rethink the way you do things.
Identifiersare data types names you can use to refer to them later in code. These are the guidelines for creating them.
- The first character must contain a letter, a ($), dollar sign or an underscore (_ ).
- The characters that follow can be letters or digits.
Frameworks can be used to perform repetitive and basic development functions. You can spend more time building the bones than putting the meat on them. This saves time on the more complicated parts of the website.