Loop

JavaScript Loops

Functions

JavaScript Functions

This example calls a function which performs a calculation, and returns the result:

Primetime Assignment

Pick a scheme, any scheme!

width: 100px;
height: 100px;
background: green;


width: 100px;
height: 100px;
background: green;
transform: rotate(45deg);


width: 100px;
height: 100px;
background: green;
border-radius: 50%;



Score:
Dealer
Card(s):
Player
Card(s):

Arithmetic!

So, 100 + 50 =

22 * 37 =

127 - 93 =

My code

html

body

45 / 5 =

p id="demo3"

script

var x = 45 / 5;

document.getElementById("demo3").innerHTML = x;

/script

/html

/body

Prime Time Assignment

The Number.isInteger() function returns true if the value is an integer.

Click the button to check whether the values are integers.

idk anymore man

sad times

Hi

p style="text-align: center" img src="img/cat.png" style="position: relative" script var cat = document.querySelector("img"); var angle = 0, lastTime = null; function animate(time) { if (lastTime != null) angle += (time - lastTime) * 0.001; lastTime = time; cat.style.top = (Math.sin(angle) * 20) + "px"; cat.style.left = (Math.cos(angle) * 200) + "px"; requestAnimationFrame(animate); } requestAnimationFrame(animate); /script

1 / 3
Marx, Father of Communism
2 / 3
Lenin, Father of the Revolution
3 / 3
Stalin, Father of the superpower that is the Soviet Union