#### Press ESC to close

In this JavaScript tutorial we propose many exercises with relative explanation and demonstration, in order to easily learn the basics of one of the most used programming languages ​​in the web.

JavaScript language is an object-oriented and event-oriented scripting language. It is used in client-side web programming to create page controls or dynamic effects.

JavaScript is a language that has spread a lot thanks to the presence of numerous frameworks and libraries.

Before starting to program you can also dedicate yourself to reading the following article: how to learn to program.

## JavaScript tutorial – index of topics

### String Method

In this part of the JavaScript tutorial we will study some useful methods and properties with strings, namely the methods toUpperCase, toLowerCase, etc… We will come back to talking about strings later.

### JavaScript function

We introduce some JavaScript functions, particularly useful for showing and taking input data.

### Exercises with strings

1. Exercises on strings
2. Palindrome word in JavaScript
3. How to determine the longest word in JavaScript
4. Regular expressions

### JavaScript Tutorial – Examples and exercises with iterative structures

1. Exercises for loop:
• Count odd and even numbers and count positive, negative and null numbers
• Calculate the average and count multiples of a number
• Add even and odd separately and add positives and negatives separately
• Print the first N odd numbers following a number A and ask for 10 numbers as input and add only the positive ones.
• Pairs of natural numbers whose sum is 30 and establish whether a product is negative, positive or null without carrying out the operation.
2. Nested for loops
3. How to develop a multiplication table
4. Fibonacci in JavaScript
5. Prime numbers in JavaScript

### JavaScript functions

In this section of the JavaScript tutorial we will study some predefined functions.

1. Math.random
2. Math.floor

### JavaScript Tutorial – Arrays

In this section of the JavaScript tutorial we will study some methods and properties that are useful with arrays in JavaScript, such as the pusch method, pop, the length property, etc.

### Loops with arrays – exercises

1. Examples for loops with arrays
2. Exercises with the for loop and arrays

### Game in JavaScript

In this section of the JavaScript tutorial we will develop fun and creative games in order to better learn some programming concepts.

1. Guess Number in JavaScript
2. Chinese morra game in JavaScript
3. Games in JavaScript – Simple quiz using arrays
4. How to make online dice games
5. 15 puzzle game in JavaScript
6. Slot machine in JavaScript
7. Memory Game in JavaScript
8. Compare numbers

## Projects

### Functions

In this part of the JavaScript language tutorial we will delve into functions and talk about callback functions.

### Tutorial JavaScript – Il DOM

In this part of the JavaScript language tutorial we will study some methods and properties that are useful for manipulating the DOM in JavaScript, such as creating and removing attributes.

1. Dom in JavaScript
2. JavaScript createElement()
3. CreateTextNode()
4. Add attributes in JavaScript (createAttribute and setAttributeNode)
5. Remove attributes
6. JavaScript getElementById
7. Insights into the method getElementById

#### Esercizi sul DOM in JavaScript

1. How to validate a form in JavaScript
2. JavaScript Calculator
3. Caesar cipher decoder
4. Decimal to binary, octal and hexadecimal converter
5. Binary decimal conversion
6. How to develop an image gallery in JavaScript

### Oggetti JavaScript, proprietà e metodi

1. Introduction to objects in JavaScript
2. How to create an object in JavaScript
3. Object in JavaScript
4. Use object Create
5. Object defineproperties
6. Object assign
7. Class JavaScript
8. Exercises on objects in JavaScript
9. Array of objects
10. Introduction to the for in loop with objects in JavaScript
11. Objects and for in loop
12. Exercises on objects and arrays
13. How to sort an array of objects

### JSON

In this section of the JavaScript language tutorial, we look at some useful ways to use JSON-formatted data in JavaScript.

1. Format JSON
2. JSON parse
3. Parsing JSON
4. JSON stringify

### AJAX

1. Introduction to AJAX
2. XMLHttpRequest object
3. AJAX and JSON

### Tutorial JavaScript – Creare PDF

1. How to create PDF with JavaScript
2. PDF from a form with JavaScript
3. Properties of a PDF with JavaScript
4. JsPDF library

### Canvas in JavaScript

1. How to use canvas in JavaScript
2. Canvas exercises with JavaScript