Coder Social home page Coder Social logo

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  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();

ReferenceError: prompt is not defined

Exercises 12 and 13 always fail because prompt is not defined.

The error is:

ReferenceError: prompt is not defined

    > 1 | let guests = prompt('How many people are coming to your wedding?');
        |                                                                    ^
      2 |
      3 | function getPrice(guests){
      4 |     let cost = 0;

      at exercises/12-How_much_the_wedding_costs/app.js:1:1039
      at Object.<anonymous> (exercises/12-How_much_the_wedding_costs/app.js:110:4)
      at Object.load (../../home/node/.local/share/@learnpack/learnpack/node_modules/rewire/lib/moduleEnv.js:55:18)
      at internalRewire (../../home/node/.local/share/@learnpack/learnpack/node_modules/rewire/lib/rewire.js:49:15)
      at rewire (../../home/node/.local/share/@learnpack/learnpack/node_modules/rewire/lib/index.js:11:12)
      at Object.rewire (exercises/12-How_much_the_wedding_costs/tests.js:12:17)

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.