JavaScript – Term 3, Week 2

 

Web addresses operate under the Domain Name System (DNS).

There are 3 parts to a domain name.

  • Top-Level Domain
  • Second-Level Domain (or Root Domain)
  • Subdomain

 


 

fish

10 fish are in a tank

2 drown

4 swim away

3 die

How many are left?


 

JavaScript: code for Maths

javascript maths add

javascript maths subtraction

javascript maths multiply

javascript maths divide


 

JavaScript: Statements

statement is a programming command for an action to be carried out.

What happens if you run two statements?

statements 2 1

statements 2 2


 

JavaScript: Comments

One-line comments start with two forward slash characters //

comment 1

Multi-line comments start with a forward slash and an asterisk   /*  and end with an asterisk and a forward slash   */

The content of comments is ignored, so if we put code inside /* … */, it won’t execute.

comment 2


 

Kodable

www.kodable.com/login

kodable

3.35pm class code = gag5j9f

4.40pm class code = n4x58k3

If students want to do more, that’s great but please only complete the ‘Sequences’ activities in the current section they’re doing – not the Conditions, Loops and Functions, which we’ll do during the term.


 

How many fish are left?

All 10 fish remain in the tank.


 

© Code Champions, July 2020

.