TF- v1 moron test scenes

here is my version of my scene selection of the moron test scene 2  scene 11 icons; (4) [{…}, {…}, {…}, {…}] 0: {class: “text-icon”, color: “#000”, content: “35”, transform: null, left: 75, …} 1: {class: “text-icon”, color: “#000”, content: “22”, transform: null, left: 35, …} 2: {class: “text-icon”, color: “#000”, content: “5”, transform: null, […]

TF-15 color change game

The color change game HTML was easy, my issues were all the additional code for the javascript, and minor mistakes.  but the CSS took some getting use to all over again. var colors = generateRandomColors(6); var circle = document.querySelectorAll(“.circle”); var pickedColor = colors[5]; var colorDisplay = document.getElementById(“colorDisplay”); var messageDisplay = document.querySelector(“#message”); var h1 = document.querySelector(“h1”); […]

ps-14 circle

Once you click on a circle it shows the RGB, still looking for code to make the circle move once clicked var circle = document.querySelector(“.circle”) var h1 = document.querySelector(“h1”) circle.addEventListener(“click”, function () { var tempColor = randomColor() circle.style.backgroundColor = tempColor h1.textContent = tempColor h1.style.color = tempColor }) function randomColor() { var r = Math.round(Math.random() * […]

13 TF – Dom

dom.html and dom.js setInterval(function(){ if (isBlue) { body.style.background = “pink”; } else { body.style.background = “purple”; } isBlue = !isBlue; }, 1000); 224 var body = document.querySelector(“body”); undefined var isBlue = false; undefined selector.html and selector.js document.getElementById(“first”); <p id=​”first” class=​”special”>​Enjoy Life​</p>​ document.querySelector(“#first”); <p id=​”first” class=​”special”>​Enjoy Life​</p>​ document.getElementsByClassName(“special”) HTMLCollection(2) [p#first.special, p.special, first: p#first.special] document.getElementsByClassName(“special”)[0] <p id=​”first” class=​”special”>​Enjoy […]

TF-12

movieDB.js and movieDB var movies = [ { title: “If beale street could talk”, hasWatched: true, rating: 5 }, { title: “peppermint”, hasWatched: true, rating: 5 }, { title: “preditor”, hasWatched: false, rating: 4 } movies.forEach(function(movie){ console.log(result) }) function buildString(movie){ var result = “you have “; if(movie.hasWatched){ result += “watched “; } else { result […]

TF-11 Arrays

PrintA and PrintA.js SumArray and SumArray.js Max and Max.js isUniform and IsUniform.js todo.html and todo.js todoL.html and todoL.js function listTodo(){ console.log(“************”) todo.forEach(function(todo, i){ console.log(i + “: ” + todo); }); console.log(“************”) //add else if to todo list } function addTodo(){ var newTodo = prompt(“Enter new todo”); todo.push(newTodo); } function deleteTodo(){ var index = prompt(“Enter index […]

TF-10

game.html and game.js var gameOver =0; function startGame(){ gameOver = 0 } function endGame(){ gameOver = 1; } function checkGame(){ if (gameOver = 0 ){ return “The game is not over”; } return “The game is over”; }   random.html and random.js function randomColor(){ var r= Math.round(Math.random()* 255) var g= Math.round(Math.random()* 255) var b= Math.round(Math.random()* […]