Skip to content

This is simple 4 JavaScript project that I did. Me as a beginner to JavaScript programming those project were helpful I practiced a lot of statements and even learned something new.

Notifications You must be signed in to change notification settings

TimHuza/4-JavaScript-Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

4 Beginner JavaScript Projects

A collection of four simple JavaScript projects for beginners. Each project self-contained and could be ran in terminal.

1. Computer Hardware Quiz (project1.js)

A simple quiz game that tests your knowledge of computer hardware. Answer three questions and get your score at the end.

How to run:

node project1.js

Sample Output

What is the brain of the computer? 
> CPU
You got it correct!
What is better a 3090ti or a 4060? 
> 4060
You got it wrong...
What was the reccomend amount of RAM in 2023? 
> 16GB
You got it correct!
You got 2 questions correct!
Your score 67%

2. Number Guessing Game (project2.js)

Try to guess a randomly generated number between 0 and 100. The game will tell you if your guess is too high or too low.

How to run:

node project2.js

Sample Output

Guess a number between 0 and 100:
> 50
Too low!
> 75
Too high!
> 62
Correct! You guessed the number in 3 tries.

3. Rock, Paper, Scissors (project3.js)

Play rock, paper, scissors against the computer. The game keeps track of your wins, losses, and ties.

How to run:

node project3.js

Sample Output

If you win

Choose rock, paper, or scissors:
> rock
Computer chose scissors.
You win!

Play again? (y/n)
> n
Wins: 1, Losses: 0, Ties: 0

If you tie

Choose rock, paper, or scissors:
> paper
Computer chose paper.
It's a tie!

If you lose

Choose rock, paper, or scissors:
> scissors
Computer chose rock.
You lose!

4. Choose Your Own Adventure game (project4.js)

A short text-based adventure game where your choices determine the outcome.

How to run:

node project4.js

Sample Output

If you win

Would you like to play (y/n)? 
> y
Would you like to go left or go right (left/right)? 
> right
Would you like to cross the bridge, or turn around and find another way (cross/turn)? 
> cross
You cross the bridge and reach the end of the game!

If you lose

Would you like to play (y/n)? 
> y
Would you like to go left or go right (left/right)? 
> left
Oops, you go left and fall of a bridge! You lost!

If you not playing

Would you like to play (y/n)? 
> n
That's too bad!

About

This is simple 4 JavaScript project that I did. Me as a beginner to JavaScript programming those project were helpful I practiced a lot of statements and even learned something new.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published