GithubHelp home page GithubHelp logo

4geeksacademy / javascript-beginner-exercises-tutorial Goto Github PK

View Code? Open in Web Editor NEW
62.0 62.0 378.0 659 KB

Learn to Code: Interactive and Auto-graded Tutorials In Javascript

License: Other

JavaScript 100.00%

javascript-beginner-exercises-tutorial's Introduction

JavaScript exercises tutorial at 4Geeks Academy

By @alesanchezr and other contributors at 4Geeks Academy

last commit build by developers build by developers

Estas instrucciones estΓ‘n disponibles en πŸ‡ͺπŸ‡Έ espaΓ±ol πŸ‡ͺπŸ‡Έ

Complete selection of auto-graded and interactive JavaScript exercises for anyone interested in learning JavaScript!

Before you start... some related tutorials:

  1. JavaScript for Beginners ← πŸ”₯ You are here
  2. Looping with JavaScript
  3. JavaScript Functions
  4. Master JavaScript

We need you! These exercises are built and maintained in collaboration with contributors such as yourself. If you find any bugs or misspellings please contribute and/or report them.

One click installation (recommended):

You can open these exercises in just a few seconds by clicking: Open in Codespaces (recommended) or Open in Gitpod.

Once you have VSCode open the LearnPack exercises should start automatically. If exercises don't run automatically you can try typing on your terminal: $ learnpack start

Local Installation

Clone the repository in your local environment and follow the steps below:

  1. Install LearnPack, the package manager for learning tutorials and the node compiler plugin for learnpack, make sure you also have node.js 14:
$ npm i learnpack -g
$ learnpack plugins:install learnpack-node
  1. Start the tutorial/exercises by running the following command at the same level where your learn.json file is:
$ npm i [email protected] -g
$ learnpack start

Note: The exercises have automatic grading, but it's very rigid and strict, my recommendation is to not take the tests too serious and use them only as a suggestion, or you may get frustrated.

How are the exercises organized?

Each exercise is a small React application containing the following files:

  1. app.js: represents the entry JavaScript file that will be executed by the computer.
  2. README.md: contains exercise instructions.
  3. test.js: contains the testing script for the exercise (you don't have to open this file).

Contributors

Thanks goes to these wonderful people (emoji key):

  1. Alejandro Sanchez (alesanchezr), contribution: (coder) πŸ’» (idea) πŸ€”, (build-tests) ⚠️ , (pull-request-review) πŸ‘€ (build-tutorial) βœ… (documentation) πŸ“–

  2. Paolo (plucodev), contribution: (bug reports) πŸ›, contribution: (coder), (translation) 🌎

  3. Ricardo Rodriguez (RickRodriguez8080) contribution: (build-tutorial) βœ…, (documentation) πŸ“–

This project follows the all-contributors specification. Contributions of any kind are welcome!

This and many other exercises are built by students as part of the 4Geeks Academy Coding Bootcamp by Alejandro SΓ‘nchez and many other contributors. Find out more about our Full Stack Developer Course, and Data Science Bootcamp.

javascript-beginner-exercises-tutorial's People

Contributors

alesanchezr avatar arat-arjat avatar arielcalisaya avatar charlytoc avatar dsilva06 avatar elviraqdp avatar florence-paloma avatar gemmamorales avatar gmihov001 avatar gorshet avatar hexbreak avatar iamjorgevillarreal avatar irenequero avatar jenseninfire avatar jferragut avatar jimenaeb avatar jomavera avatar josemoracard avatar jtoledo88 avatar kant avatar kiddopro avatar lorenagubaira avatar marcogonzalo avatar omonroy36 avatar plucodev avatar rvpacheco avatar sadiel0 avatar tommygonzaleza avatar umikami avatar zagarsix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

javascript-beginner-exercises-tutorial's Issues

Learnpack issue

When I am using learnpack during the JS exercises, when I try to test my code it says "internal error."

error persistente

al llegar a un cierto punto del learn pack me da error y no me sigue cargando

Testing Bug in Exercise 20

excercise-20-bug

There appears to be a bug in the tests for excercise 20. The potential solution (below) fails with :

     x (fail) 2. console.log() function should be called 10 times
     x (fail) 3. console.log() function should be called with a string

even though it does call console.log 10 times with a string (the generated colors):

excersize-20-output

//get random integer between (inclusive of) min and max
function getRandomInt(min, max) {
	min = Math.ceil(min);
	max = Math.floor(max+1);
	return Math.floor(Math.random() * (max - min) + min);
  }
  
function getColor(colorNumber=0)
{
	//make sure parameter is a number and not a string by converting the value to int:
	colorNumber = parseInt(colorNumber);
	switch(colorNumber){
		case 1: return "red"; 
				break;
		case 2: return "yellow"; 
				break;
		case 3: return "blue"; 
				break;
		case 4: return "green"; 
				break;
		default: return "black"; 
				 break;
	}
}

function getAllStudentColors(){
	
    for(let i=0; i<10; i++){
		let studentColor = getColor(getRandomInt(1,4));
		console.log(studentColor);

	}

}

//call the function below with the number of students in the class and print on the console
getAllStudentColors();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.