1. O livro "Head First - Javascript programming"

"Head First - Javascript programming" (2014)

Vamos utilizar o seguinte livro incluindo os diferentes materiais de apoio que o acompanham (ver mais abaixo):

"Head First - Javascript programming" (2014)

Índice do livro (só capítulos 1, 2 e 3)

Indice: Caps 1, 2 e 3

Acesso direto à folha de cálculo: docs.google.com/spreadsheets/d/1sFaRCA2VhPv5ScoN9OXn42qUhVqltt83FP0CtcXIVF4/edit

Capitulo 1: Getting your feet wet (A quick dip into javascript)

1. The way JavaScript works 2

2. How you’re going to write JavaScript 3

3. How to get JavaScript into your page 4

4. JavaScript, you’ve come a long way baby... 6

5. How to make a statement 10

6. Variables and values 11

7. Back away from that keyboard! 12

8. Express yourself 15

9. Doing things more than once 17

10. How the while loop works 18

11. Making decisions with JavaScript 22

12. And, when you need to make LOTS of decisions 23

13. Reach out and communicate with your user 25

14. A closer look at console.log 27

15. Opening the console 28

16. Coding a Serious JavaScript Application 29

17. How do I add code to my page? (let me count the ways) 32

18. We’re going to have to separate you two 33

19. Bullet points 37

Capitulo 2: Going further (Writing real code)

1. Let’s build a Battleship game 44

2. Our first attempt... 44

3. First, a high-level design 45

4. Working through the Pseudocode 47

5. Oh, before we go any further, don’t forget the HTML! 49

6. Writing the Simple Battleship code 50

7. Now let’s write the game logic 51

8. Step One: setting up the loop, getting some input 52

9. How prompt works 53

10. Checking the user’s guess 54

11. So, do we have a hit? 56

12. Adding the hit detection code 57

13. Provide some post-game analysis 58

14. And that completes the logic! 60

15. Doing a little Quality Assurance 61

16. Can we talk about your verbosity... 65

17. Finishing the Simple Battleship game 66

18. How to assign random locations 67

19. The world-famous recipe for generating a random number 67

20. Back to do a little more QA 69

21. Congrats on your first true JavaScript program, and a short word about reusing code 71

Capitulo 3: Getting functional (Introducing functions)

    1. Introducing functions - Getting functional 79
    2. What’s wrong with the code anyway? 81
    3. By the way, did we happen to mention FUNCTIONS? 83
    4. Okay, but how does it actually work? 84
    5. What can you pass to a function? 89
    6. JavaScript is pass-by-value. 92
    7. Weird Functions 94
    8. Functions can return things too 95
    9. Tracing through a function with a return statement 96
    10. Global and local variables 99
    11. Knowing the scope of your local and global variables 101
    12. The short lives of variables 102
    13. Don’t forget to declare your locals! 103

Acesso direto ao PDF:

O jogo da Batalha Naval

Na seguinte página vamos desenvolver o fluxograma e o pseudo-código do jogo da Batalha Naval, retirado do capitulo 2, secção 6, "Writing the Simple Battleship code" (pág. 50): sites.aebenfica.org/apontamentos-tic/programacao/javascriptbatalhanaval

Pasta DRIVE com o livro e os materiais de apoio que o acompanham:

Livro: "Head First - Javascript programming" (2014) (acesso reservado ao utilizadores do domínio)

Materiais de apoio fornecidos pela editora do livro

Todo o código apresentado ao longo do livro encontra-se disponível no GitHub

Ver github.com/bethrobson/Head-First-JavaScript-Programming

Cada capitulo tem um pequeno video de apoio

Sobre a utilização da consola nos diferentes navegadores