Moron Test Complete

Problem Set Test your scenes.js file against v5 Make any adjustments needed to get your code working (for example add color variables if you wish) If you’re adventurous consider playing with v6beta of the code which adds scene[level].start and scene[level].finish methods. There’s a number of other changes from v5 in there to grapple with, but if you’re up for learning how to …

Continue reading “Moron Test Complete”

Moron Test Part 4

Problem Set Create a function iconListener() that will add event listeners to all your <i> elements. The event is a “click” and the callback should hide (add the .hidden class) the clicked icon, as well as console.log the icon element and its index value. ***Bonus**** Create a function start(iconArr) that calls the three functions in sequence: clearIcons() mapIcons(iconsArr) iconListener() …

Continue reading “Moron Test Part 4”

Chapter 11 Problem set

Reverse Array – Create a function reverseArray(arr) which takes an array as an argument. The function returns a new array with the values reversed. For example: reverseArray([1,2,3]) returns [3,2,1]. Range Array – Create a function rangeArray(start, end) which takes two numbers as arguments. The function returns an array containing all the numbers from the start up to and including the end. For example: rangeArray(3, 9) returns [3,4,5,6,8,9]. Longest Username – Create …

Continue reading “Chapter 11 Problem set”

10 Problem Set

Random Color – Create a function randomColor() when called returns a random RGB color value like rgb(173, 65, 203). Game – Create three functions startGame(), endGame(), and checkGame(). Each function concerns the boolean value of gameOver and should affect gameOver as the function is named. How can you save a returned value from a function? Returning the value as a variable. Why do we create functions in …

Continue reading “10 Problem Set”

09 Questions

How are you really feeling? Write a program that asks “How are you feeling?” Then have the program immediately ask again, “How are you really feeling?” Have the program compare the statements. If the statements match, then send a message, “Wow so you really feel insert feeling” If they don’t match send a message, “Ok so you’re not sure …

Continue reading “09 Questions”