## javascript mission 3

Learn the basics of how to exploit JavaScript.

### Re: javascript mission 3

a tip:

Can't JS tell you the answer?
DamegedSpy
Poster

Posts: 273
Joined: Sat Dec 19, 2009 1:40 pm
Blog: View Blog (0)

### Re: javascript mission 3

nate1256 wrote: wait 5+6x7 is not 47 5+6 is 11 x 7 is 77

No, it does equal 47. The multiplication would be done first, then the addition. 6*7=42 42+5=47

Defience

Posts: 1279
Joined: Thu Jun 12, 2008 3:16 pm
Blog: View Blog (0)

### Re: javascript mission 3

I think I figured out what to do, done that and somehow its not working only I dont think I could ask my question here, because it could be a big spoiller.. (even though it has been mentioned several times on the forum..)

anyhow.. its not working, could a mod please mesage me?
Taug
New User

Posts: 3
Joined: Wed Mar 24, 2010 2:21 pm
Blog: View Blog (0)

### Re: javascript mission 3

Taug wrote:I think I figured out what to do, done that and somehow its not working only I dont think I could ask my question here, because it could be a big spoiller.. (even though it has been mentioned several times on the forum..)

anyhow.. its not working, could a mod please mesage me?

I'm not a mod, but what are you having trouble with?

HTS User Composition:
95% Male
4.98% Female
.01% Monica
.01% Goat

sanddbox
Expert

Posts: 2354
Joined: Sat Jul 04, 2009 5:20 pm
Blog: View Blog (0)

### Re: javascript mission 3

ah, nevermind, i've got it
Taug
New User

Posts: 3
Joined: Wed Mar 24, 2010 2:21 pm
Blog: View Blog (0)

### Re: javascript mission 3

This is all u have to know:

calculate moo.
legth of x is equal to value of moo.

Edit me if its too much of a spoiler.
The_Faceless
New User

Posts: 4
Joined: Wed Apr 14, 2010 12:28 pm
Blog: View Blog (0)

### Re: javascript mission 3

If anyone is still banging their head against the wall (and I can sympathise...) the only tip I can really offer is stop over-thinking it. Take a mental step backwards and look at the information you've already worked out, it's much simpler than you think.

You'll get there in the end, keep at it
t0rpik
New User

Posts: 1
Joined: Thu Apr 15, 2010 3:23 pm
Blog: View Blog (0)

### Re: javascript mission 3

ok so just ot be clear when i calculate it. moo = [herp derp] right? [Edited by Goatboy] -- No spoilers!
morchase1
New User

Posts: 1
Joined: Sun Apr 27, 2008 2:32 am
Blog: View Blog (0)

### Re: javascript mission 3

the answer can range from 0 - 99999999999999
gagongrocker
New User

Posts: 1
Joined: Thu Jun 03, 2010 6:45 pm
Blog: View Blog (0)

### Re: javascript mission 3

_Kaiser wrote:I have to admit, this one was a real b****rd of a mission, but once you get it, you will look back and think... man, why didn't i see it?

I promise that I will try as hard as I can not to include spoilers, so if anyone sees a spoiler, PM me and ill edit it, or a Mod can change it if they think it is a spoiler, i dont mind. I want to help, not hinder. I've more regurgitated what others have said in a logical way rather than say anything new.

This is what you are given:

var foo = 5 + 6 * 7
var bar = foo % 8
var moo = bar * 2
var rar = moo / 3

superkid68 wrote:Hints:
2. Get the browser to do the work
ex. type this into the address bar
Code: Select all
`javascript: var a=1+1; var b=a*2; `

Taking superkid68's advice, get your algebra skills to work. Although, write it out character for character, and change 'a' and 'b' for foo, bar, etc. I find it helps, since if you have read this far into the forum, your head is obviously acheing from a massive headache. So, let's do it:

javascript: var foo=x+x; var bar=foo*x; var moo=bar%x; alert(moo);

As you should realise, its filled with x's and the calculations arent correct. That's your job. I'm here to help, not give spoilers. I'm afraid I might have done too much already o.o Once you fix it up, paste it into your address bar, and you will get a message with your answer for moo!

Anyway, you now have moo (or atleast you should) so try to figure out "x.length == moo"

To give you a further push in the right direction, remember what ulcmid1 said:
ulcimd1 wrote:You DO need to find the value of moo... the script compares the value of (x.length...the length of the x variable, as in how many digits are in the input box) to the value for moo. You are not comparing apples to apples, you are comparing the color of an apple, to the color of a picture of an apple...get it?

If you dont get it, think of it this way. One may be an apple and the other a photo, but their color is the same. Think about how that might indicate the link between moo and x.length.

Goodluck!

This is by far the most helpful comment in the whole topic. You finally helped me to get this solved! Thank you!
dryan241
New User

Posts: 2
Joined: Sat Sep 19, 2009 5:39 am
Blog: View Blog (0)

PreviousNext