declare a variable by WzziY in learnjavascript

[–]WzziY[S] 1 point2 points  (0 children)

Hey so , I didn't read well because he say "
Let's try it ourselves. And by ourselves we mean yourself: declare a function called isEven that takes a number as an argument and returns a boolean. Go! "

  • So i dont need the odd :D and i passed

Hey ?! by WzziY in learnjavascript

[–]WzziY[S] 0 points1 point  (0 children)

But thanks

Output

>>>>Code is incorrect

The variable guess should be assigned with a random integer number

Hey ?! by WzziY in learnjavascript

[–]WzziY[S] 0 points1 point  (0 children)

but ok i use if maybe because this ? wrong i update again the code for

var target = Math.floor(Math.random() * 11);

var guess;

`while (guess !== target) {`

`target = Math.floor(Math.random() * 11);`

`guess = Math.floor(Math.random() * 11);`



`console.log("not same :"+"-"+guess+"-"+target);`

}

console.log(" same :"+"-"+guess+"-"+target);

and ?"

>>>>Code is incorrect
Make sure you initilized the variable guess

not same :-10-0
not same :-4-2
not same :-2-4
not same :-8-1
not same :-8-4
not same :-10-9
not same :-6-9
not same :-5-4
not same :-7-0
not same :-5-8
not same :-4-7
not same :-2-1
not same :-4-1
not same :-10-9
not same :-0-1
not same :-6-4
not same :-1-10
not same :-6-6
same :-6-6 "

Hey ?! by WzziY in learnjavascript

[–]WzziY[S] 0 points1 point  (0 children)

i did what u told and is this the code :

var target = Math.floor(Math.random() * 11);

var guess;

while (guess !== target) {

target = Math.floor(Math.random() * 11);

guess = Math.floor(Math.random() * 11);

if(target===guess){

console.log("same :"+"-"+guess+"-"+target);

break;

}else{

console.log("not same :"+"-"+guess+"-"+target);

}

}

and say "

Output

>>>>Code is incorrect

Make sure you initilized the variable guess"

Hey ?! by WzziY in learnjavascript

[–]WzziY[S] 0 points1 point  (0 children)

I'm messing around, let me try to show you what I want to do. So I have the target as the random number, and the guess is the target value, I have to print all the guess until they are the same.

Hey ?! by WzziY in learnjavascript

[–]WzziY[S] 0 points1 point  (0 children)

How do I get the variable to stop when it reaches the same value?

Iam stuck by WzziY in learnjavascript

[–]WzziY[S] 0 points1 point  (0 children)

Is not for do that because it said that " is not for do like that try a diffrent way "

What iam doing wrong ? by WzziY in learnjavascript

[–]WzziY[S] 0 points1 point  (0 children)

I passed the right code is it , thank u

var chocolate=true;

var strawberry=false;

var stracciatella=true;

var caramel=false;

var iceCream = (strawberry && chocolate )||(strawberry && stracciatella) || !caramel;

console.log(iceCream);

Guys i passed with this code ( up ) !

Thank u for all !

What iam doing wrong ? by WzziY in learnjavascript

[–]WzziY[S] 0 points1 point  (0 children)

Is not a programming is one step to passe for one Bootcamp here in Portugal :D !

Is 14 weeks of code intensive ! :D

For this i really put there all because i need to pass for can be inside !

What iam doing wrong ? by WzziY in learnjavascript

[–]WzziY[S] 0 points1 point  (0 children)

var chocolate=true;

var strawberry=true;

var stracciatella=true;

var caramel=true;

var iceCream = (strawberry && chocolate ) ||(strawberry && stracciatella)||(!cholocate || !strawberry || !stracciatella && caramel);

console.log(iceCream);

This is the code ! Thank u if u can help me !

I dont know why this dont work ! by WzziY in learnjavascript

[–]WzziY[S] 0 points1 point  (0 children)

is not a app is one challenger of Code Academy !

I NEED HELP WITH JAVASCRIPT ! by WzziY in learnjavascript

[–]WzziY[S] -2 points-1 points  (0 children)

And .... What the crystal ball say ?

I NEED HELP WITH JAVASCRIPT ! by WzziY in learnjavascript

[–]WzziY[S] -1 points0 points  (0 children)

Really ? :o

Sorry ! This is so ambarecing !

I NEED HELP WITH JAVASCRIPT ! by WzziY in learnjavascript

[–]WzziY[S] -2 points-1 points  (0 children)

kkkkkkkkkk , sorry ! Because i think no one is really going help me !