Skip to content

wbenarto/js-tania

Repository files navigation

Whack a Mole game

Requirements

Moles (CSS JS) Background Image (CSS) Cursor/hammer (CSS JS) Total Points variable (JS) Game Timer (JS)

Functions

Start Game Mole to hide and show, within the time set OnClick function when mole is hit Random Pop up for mole

To Do for Tania

2/12/2023

2 hours Reviewing HTML and CSS

Properties on CSS, HTML setup

log the time you work on

2/19/2023

Finish Javascript Functions and game

improve design

2/26/2023

Tania Test

Test 2/26/2023 SCORE: 75/100

Each questions have 10 points

Questions:

1. Choose the correct ways of creating a variable in Javascript and briefly explain: (6 points)

[Yes] Let (Creates variables that allows you to change/update values.) [wb-yes] Const (Creates constant variables and will not be able to be manipulated and create bugs.) X [wb-yes] Var (Older way of writing variables. ) [x] Div [x] Html

2. Create a constant variable in javascript that stores a string value of "Cheese": (9 points)

const ingredient = "Cheese";

3. Create a function that prints "I love indomie" in the console. (10 points)

function printIndomie(str) { console.log(str) console.log("I love indomie"); }

  1. Function Declaration
  2. Function Name
  3. Function Arguments
  4. Function Code blocks

printIndomie("tania") printIndomie()

'tania' 'I love indomie'

'I love indomie'

4. Create a function that takes a String argument and prints that argument in the console. (8 points)

function printString(string argument) { console.log("string argument"); }

Correct answer: function printString(str) { console.log(str); }

5. How many ways can you run Javascript in your HTML? explain briefly (10 points)

You can use inline script tags, external script files, event handlers, and dom manipulation.

  • Inline script tags are when you add JavaScript in your HTML file.
  • External script files are when you add JavaScript code in an external file and link it.
  • Event handlers are to run JavaScript lines of code as a result of a user's choice of action.
  • DOM manipulation is when you use the JavaScript with the HTML file after its loaded.

6. Create a div element with an h1 element inside that says "Happy Sunday" (9 points)

Happy Sunday

7. What is difference between id and class in HTML (5 points)

The difference between id and class in HTML is that you use an period sign for classes and a hashtag for ids. Id is also used for individual things while class is used for things used multiple times.

8. How many ways can you style your html page? Explain briefly. (0 points)

You can use animations and url image links.

wb: Inline Styling and External Page

9. Write the correct syntax for CSS to style html element with the ID of 'basketball' (8 points)

#basketball { color: orange; }

10. Write the correct syntax for CSS to style html element with the class of "cards' (10 points)

.cards { border: dotted; color: red; length: 10px; height: 50px; }

3/5/2023 Implement Countdown on the project target (1 hour)

6/28/2023 Found a new bug in the timer (Starts at 20 seconds, stops at 10 seconds instead of 0 seconds.)

8/20/2023 Psuedo Code (Add the abilities to the Pokemon card)

Task on 2/28/24

Insert background images for all the cards

https://dribbble.com/shots/21275521-Pokedex-UI#

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published