This forum is now read-only. Please use our new forums! Go to forums

0 points
over 11 years

Someone plz give me the answer to 3.5

Plzzzzzz help me i’ve tried everything

Answer 5081fadad7c5a80200001e5b

1 vote

Permalink

So I don’t know what code you’ve been trying. But the syntax to create an array is like this: var arrayName = ["string", 1, true]; the syntax to print a whole array is like this: console.log(arrayName);

points
Submitted by Kevin Quirolo
over 11 years

Answer 50898e68a0e96b0200002cbe

1 vote

Permalink

var junk = [“coke”, “boy”, 2, 2]; var count = junk.length;

var isLost = function (n) { for (i = 0; i < count; i++) { if ( n === junk[i]) { return true; } } return false; };

if ( isLost(12) ) { console.log(‘12 is a lost number’); }

if ( isLost(16) ) { console.log(‘16 is a lost number’); } console.log(junk);

points
Submitted by rami4235
over 11 years

Answer 50b1b31612323a7fec00178f

0 votes

Permalink

Just to get pass this exercise it doesnt have to be complicated i just did a simple

var junk = ["Poop", "McPoop", 18, 24]

And thats all i had to do :)

points
Submitted by sinema4dee
over 11 years

1 comments

Sébastien Lavergne over 11 years

:D

Answer 516c2069cfc0db4d1300054a

0 votes

Permalink

This works.

var junk = [“tire”, “car”, 14, 29]; console.log (arrayjunk);

This works too because [ ] signifies an array.

var junk = [“tire”, “car”, 14, 29]; console.log (junk);

points
Submitted by Tolkie
almost 11 years