JavaScript – Term 3, Week 1

Coding Test

Go to classtime.com

Enter the code

test code for parents

It’s a two-step process to start:

enter code      enter details


 

How many squares on a chessboard?

chessboard 2

Answer at end of page …


 

Code Editor

The code editor we used is JS Editor, jseditor.io

The blank template can be accessed at https://jseditor.io/?key=javascript-introduction (Or you can just open a new file and wipe the code.)

jseditor page

Remember to code on the JavaScript tab!


 

Some examples of the code we used

alert();

alert hello world

line break

var firstName

 


 

How many squares on a chessboard?

204

(8×8 = 1, 7×7 = 4, 6×6 = 9, 5×5 = 16, 4×4 = 25, 3×3 = 36, 2×2 = 49, 1×1 = 64)


 

© Code Champions, July 2020

.