A personal collection of lessons, notes, exercises, and small experiments created while studying JavaScript with the Curso em Vídeo JavaScript course.
This repository records a learning journey rather than a single finished application. It keeps early examples alongside more interactive browser exercises so that beginners can follow the progression from basic input and output to DOM manipulation, arrays, functions, and objects.
Work in progress: the repository is being reorganized and refactored gradually. Some files have already received clearer English comments and identifiers, while others still contain Portuguese text, older naming conventions, duplicated material, or intentionally simple implementations.
- Variables declared with
letandconst, primitive values, andtypeof - Arithmetic, comparison, logical, assignment, and ternary operators
- Type conversion with
Number(),Number.parseFloat(), and string conversion - Template literals and string properties/methods such as
length,toUpperCase(),slice(),trim(), andreplace() - Number formatting with
toFixed()andtoLocaleString() - Input and output through browser dialogs, the document, forms, and the console
- Simple, compound, and nested conditionals, plus
switch while,do...while,for, andfor...inloops
- Function declarations, parameters, return values, and default parameters
- Function expressions, arrow functions, and recursive functions
- Arrays: indexing,
length,push(),sort(),indexOf(),filter(), and iteration - Validation, duplicate detection, accumulation, minimum/maximum values, totals, and averages
- Object literals, properties, methods, and
this
- DOM selection with
getElementById(),getElementsByTagName(),getElementsByName(), andquerySelector() - Reading form values and updating content with
innerTextandinnerHTML - Dynamic styling through the
styleAPI - Creating and inserting elements with
createElement(),setAttribute(), andappendChild() - Inline event handlers and
addEventListener()for click and mouse events - Page-load behavior with
onload - The
DateAPI for the current hour, year, and day of the week - HTML forms, semantic page sections, inline/external CSS, Flexbox, and responsive viewport metadata
- Dynamic image and color changes using local WebP assets
The directory names mostly follow the original course organization. aula means “lesson,” and the abbreviated exrc directories contain exercises.
| Path | Content |
|---|---|
CursoJS/aula04/ |
First HTML/JavaScript page and browser dialog methods |
CursoJS/aula06/ |
Variables, prompts, conversion, strings, arithmetic, and number formatting |
CursoJS/aula09/ |
DOM selection, content changes, document properties, and dynamic styles |
CursoJS/aula10/ |
DOM events and a form-based addition exercise |
CursoJS/aula11/ |
Simple and compound conditionals in console and browser examples |
CursoJS/aula12/ |
Nested conditions, Date, and switch |
CursoJS/aula13_aula14/ |
while, do...while, and for loops |
CursoJS/aula15/ |
Arrays, iteration, searching, mixed values, and filter() |
CursoJS/aula16/ |
Functions, default parameters, arrow functions, and factorial recursion |
CursoJS/aula17/ |
A basic object with properties, a method, and this |
CursoJS/exrc/ |
A reusable page template plus the time-of-day and age-checker exercises |
CursoJS/exrcE/ |
Counter and multiplication-table exercises |
CursoJS/exrcF/ |
Number analyzer and an unfinished exercise template |
exrc/ |
A second copy of the template, time-of-day, and age-checker material also stored under CursoJS/exrc/ |
The repository also includes an MIT LICENSE and the local images used by the time-of-day and age-checker pages.
| Exercise | What it demonstrates |
|---|---|
| Time of Day | Reads the current hour and changes the message, background, and image |
| Age Checker | Validates a birth year, calculates age, reads radio controls, and creates an image element |
| Counter | Validates start/end/step fields and produces ascending or descending sequences |
| Multiplication Table | Builds <option> elements dynamically inside a <select> |
| Number Analyzer | Stores unique numbers and reports count, minimum, maximum, sum, and average |
The generic modelo pages are scaffolds, and CursoJS/exrcF/modeloEx19/script.js is currently empty.
There are no package dependencies, build tools, or installation steps. A modern browser is enough for the HTML exercises; Node.js is optional for the console-only scripts.
You can open any .html file directly in a browser. For a local HTTP server, run this command from the repository root:
python3 -m http.server 8000Then visit a file through http://localhost:8000, for example:
http://localhost:8000/CursoJS/aula10/ex006/ex006.html
http://localhost:8000/CursoJS/exrc/modeloEx14/model.html
Some early lessons display prompts, alerts, or confirmation dialogs immediately when the page loads. Keep each HTML file beside its associated script, stylesheet, and images so its relative paths continue to work.
Run the standalone lesson scripts with Node.js, for example:
node CursoJS/aula11/ex008_ex009.js
node CursoJS/aula15/ambiente.js
node CursoJS/aula16/funcao01_funcao02_funcao03_funcao04_funcao05.js
node CursoJS/aula17/objeto01.jsScripts inside the browser exercise directories depend on the DOM and should be run through their corresponding HTML pages instead of directly with Node.js.
Refactoring is ongoing. The current work includes translating comments and visible text from Portuguese to English, replacing short or ambiguous identifiers with clearer names, and improving organization and readability. Progress is uneven by design: newer revisions coexist with original course-era material so the repository still shows the learning process.
At present:
- English and Portuguese are both present in interfaces, comments, identifiers, and filenames.
- Some early lesson files are more heavily revised than the later browser exercises.
- The top-level
exrc/directory largely duplicates material inCursoJS/exrc/. - Generic templates and the exercise 19 script remain incomplete placeholders.
- There is no automated test suite; examples are intended to be explored in a browser or run individually with Node.js where appropriate.
This is intentionally an educational, beginner-friendly code collection—not a production application. Older patterns and inconsistencies may remain until the relevant lesson or exercise is revisited.
This repository is available under the MIT License.