The Instigator
TheRealSpassky101
Pro (for)
Losing
0 Points
The Contender
distraff
Con (against)
Winning
3 Points

Does anyone know why this ja<x>vascript is not working?

Do you like this debate?NoYes-1
Add this debate to Google Add this debate to Delicious Add this debate to FaceBook Add this debate to Digg  
Vote Here
Pro Tied Con
Who did you agree with before the debate?
Who did you agree with after the debate?
Who had better conduct?
Who had better spelling and grammar?
Who made more convincing arguments?
Who used the most reliable sources?
Reasons for your voting decision
1,000 Characters Remaining
The Voting Period Ends In
174days08hours56minutes28seconds
Voting Style: Open Point System: 7 Point
Started: 11/23/2016 Category: Technology
Updated: 5 days ago Status: Voting Period
Viewed: 240 times Debate No: 97292
Debate Rounds (5)
Comments (13)
Votes (1)

 

TheRealSpassky101

Pro

cript>
var a = 0;
var b = 0;
var c = 0;
var d = 0;
var e = 0;
var f = 0;
var g = 0;
var h = 0;
while (h <= 25) {
for ( i = 0; i < 25; i++ ) {
var a = i;
if (i = 25) {
var b = i;
}
if (b = 25) {
var c = i;
}
if (c = 25) {
var d = i;
}
if (d = 25) {
var e = i;
}
if (e = 25) {
var f = i;
}
if (f = 25) {
var g = i;
}
if (g = 25) {
var h = i;
}
switch (a) {
case 0:
var a = "a";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 1:
var a = "b";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 2:
var a = "c";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 3:
var a = "d";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 4;
var a = "e";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 5:
var a = "f";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 6:
var a = "g";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 7:
var a = "h";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 8:
var a = "i";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 9:
var a = "j";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 10:
var a = "k";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 11:
var a = "l";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 12:
var a = "m";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 13:
var a = "n";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 14:
var a = "o";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 15:
var a = "p";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 16:
var a = "q";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 17:
var a = "r";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 18:
var a = "s";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 19:
var a = "t";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 20:
var a = "u";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 21:
var a = "v";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 22:
var a = "w";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 23:
var a = "x";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 24:
var a = "y";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 25:
var a = "z";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
}
switch (b) {
case 0:
var b = "a";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 1:
var b = "b";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 2:
var b = "c";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 3:
var b = "d";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 4;
var b = "e";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 5:
var b = "f";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 6:
var b = "g";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 7:
var b = "h";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 8:
var b = "i";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 9:
var b = "j";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 10:
var b = "k";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 11:
var b = "l";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 12:
var b = "m";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 13:
var b = "n";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 14:
var b = "o";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 15:
var b = "p";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 16:
var b = "q";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 17:
var b = "r";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 18:
var b = "s";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 19:
var b = "t";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 20:
var b = "u";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 21:
var b = "v";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 22:
var b = "w";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 23:
var b = "x";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 24:
var b = "y";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 25:
var b = "z";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
}
switch (c) {
case 0:
var c = "a";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 1:
var c = "b";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 2:
var c = "c";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 3:
var c = "d";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 4;
var c = "e";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 5:
var c = "f";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 6:
var c = "g";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 7:
var c = "h";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 8:
var c = "i";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 9:
var c = "j";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 10:
var c = "k";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 11:
var c = "l";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 12:
var c = "m";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 13:
var c = "n";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 14:
var c = "o";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 15:
var c = "p";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 16:
var c = "q";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 17:
var c = "r";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 18:
var c = "s";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 19:
var c = "t";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 20:
var c = "u";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 21:
var c = "v";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 22:
var c = "w";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 23:
var c = "x";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 24:
var c = "y";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 25:
var c = "z";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
}
switch (d) {
case 0:
var d = "a";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 1:
var d = "b";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 2:
var d = "c";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 3:
var d = "d";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 4;
var d = "e";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 5:
var d = "f";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 6:
var d = "g";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 7:
var d = "h";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 8:
var d = "i";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 9:
var d = "j";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 10:
var d = "k";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 11:
var d = "l";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 12:
var d = "m";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 13:
var d = "n";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 14:
var d = "o";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 15:
var d = "p";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 16:
var d = "q";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 17:
var d = "r";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 18:
var d = "s";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 19:
var d = "t";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 20:
var d = "u";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 21:
var d = "v";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 22:
var d = "w";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 23:
var d = "x";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 24:
var d = "y";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 25:
var d = "z";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
}
switch (e) {
case 0:
var e = "a";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 1:
var e = "b";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 2:
var e = "c";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 3:
var e = "d";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 4;
var e = "e";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 5:
var e = "f";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 6:
var e = "g";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 7:
var e = "h";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 8:
var e = "i";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;
case 9:
var e = "j";
prompt(h + g + f + e + d + c + b + a + "@gmail.com");
break;

And so on. This code is not working; it is not the full code but it is the general gist of it.
distraff

Con

I am a javascript developer and took a look at your code. Some of your case statements had a semicolon ';' instead of a colon ':' that was breaking them.

Also your if statements were using '=' which sets variables rather than checking. It is better to use '=='.

I am also curious what specifically your program needs to do as it doesn't seem to make logical sense. Are you trying to randomly generate email addresses? Are you trying to prompt people for information? Are you trying to create a popup that prevents people from leaving the page?
Debate Round No. 1
TheRealSpassky101

Pro

Thank you. Actually, I wouldn't even attempt to trap someone with prompts. That is to simplistic. I prefer unlimited tabs; it also crashes the computer. The only reason I am studying stuff like this is because I want to be a CEH. I also used to own a business because I accidentally hacked it. And yes, I am trying to randomly generate email addresses, but it only gave me 4 email addresses that were completely jacked up.
distraff

Con

>> The only reason I am studying stuff like this is because I want to be a CEH. I also used to own a business because I accidentally hacked it.

Hacking sure sounds fun, especially if you aren't risking getting arrested for it. You earn some good money in computer security and you can also maybe work on building computer security systems as well.

>> Actually, I wouldn't even attempt to trap someone with prompts. That is to simplistic.

Annoying people by trapping them on the page is only going to alert them to the fact that the page is malicious and they will just find a way to get out.

>> I prefer unlimited tabs; it also crashes the computer.

Now that would be really annoying. But for a hacker this is useless since they don't actually get anything out of just crashing the computer. People can just restart and not visit the website again.

>> And yes, I am trying to randomly generate email addresses, but it only gave me 4 email addresses that were completely jacked up.

Here is a program that generates random emails. Gmail addresses are 6 to 30 character and it does them between those lengths. Addresses can have numbers, letters, and periods, and are case sensitive. The number of possible gmail addresses is massive and makes a trillion almost indistinguishable from zero in comparison. So when you click the generate emails button in the page it will only give 2,000 at a time or else your computer will crash.

Inspect the code and paste it into an html file to see it run. It has a library built around the nextEmail function and an example using that function in batches of 2,000.

Example program:
https://docs.google.com...

The problem is that there are so many possible emails that the percent of emails that are taken is virtually 0%. A better method would be to go through a dictionary and generate random emails on it, maybe adding numbers or dots between the words. These emails are far more likely to be used. car.horse(at)gmail.com is far more likely to be used than q3W2T2(at)gmail.com. You can also find a dictionary with first and last names as well and maybe go through common ones first.
Debate Round No. 2
TheRealSpassky101

Pro

Thank you, that was very useful.
distraff

Con

No problem, let me know if you have any more questions.
Debate Round No. 3
TheRealSpassky101

Pro

Blank argument.
distraff

Con

Empty Argument.
Debate Round No. 4
TheRealSpassky101

Pro

No argument.
distraff

Con

Empty Argument
Debate Round No. 5
13 comments have been posted on this debate. Showing 1 through 10 records.
Posted by whiteflame 1 day ago
whiteflame
*******************************************************************
>Reported vote: dsjpk5// Mod action: NOT Removed<

3 points to Con (Arguments). Reasons for voting decision:

[*Reason for non-removal*] This debate does not require RFDs, and as such, votes on this debate are not moderated.
************************************************************************
Posted by TheRealSpassky101 2 weeks ago
TheRealSpassky101
I meant document.write and not prompt. Thank you.
Posted by Perussi 2 weeks ago
Perussi
Where is it writing it into the html? Is each document.write in a different spot. You may have to specify this is python. Does document.write work with html how you think it does?
Posted by MakeSensePeopleDont 2 weeks ago
MakeSensePeopleDont
Leave him go, it's not hurting anyone. I'm sure you can find more important things to do with your time than jock ride a kid for trying to educate himself.
Posted by PowerPikachu21 2 weeks ago
PowerPikachu21
This isn't the place for coding questions.
Posted by MakeSensePeopleDont 2 weeks ago
MakeSensePeopleDont
OH, an important note here....if your data stream is in the .close(); state and you call the .write() method...the system will automatically run document.open() method for you in the background...erasing your data stream to blank again.

This is why it is imperative to NOT call the document.close(); method until you are full done with the data stream or you require a blank slate.

If you want a new, 2nd window opened up, you would use the window.open(); method.
Posted by TheRealSpassky101 2 weeks ago
TheRealSpassky101
Thank you. I appreciate it.
Posted by MakeSensePeopleDont 2 weeks ago
MakeSensePeopleDont
AH, that's completely different buddy. This is actually a very common problem for first time output stream users, especially when using loops.

Document.write() actually requires three methods, in this order:

1) Document.open(); //This opens the data stream so data can be written to it
2) Document.write(); //This writes your data to the document stream
3) Document.close() //This closes the previously opened data stream

Now, the trick to this is to understand that your building a temporary document; this is not like opening Microsoft Word, typing in your name, saving the file and closing it, then reopening it.

1) If you document.open();
2) Then use document.write(); to write to the data stream //right now, you have data, written and good to go.
3) Then use document.close(), closes the stream //Closes the stream without garbage cleanup
4) The next time you call document.open() //You open a new data stream and overwrite all data previously written to the data stream.

Think of document.write(); method sequence as an etch-a-sketch.

1) You pick it up out of the box (document.open())
2) You turn the knobs a bunch of times and make a beautiful squiggly line house (document.write())
3) You put it back in the box (document.close())
4) Next time you pick up that etch-a-sketch, it is unavoidable, your picture will get erased

Usually, the culprit here is a method using loops like for, while, do / while loops.

You ABSOLUTELY MUST, MUST, MUST, MUST ensure that you do NOT call the document.close() method until after you have finished loading data into the data stream AND you no longer require that data stream.
Posted by TheRealSpassky101 2 weeks ago
TheRealSpassky101
The document.write was not displaying any information.
Posted by MakeSensePeopleDont 2 weeks ago
MakeSensePeopleDont
I probably should have started this conversation a bit differently, so let me back track a bit here.

Question for you:

What is going on that is telling you the code isn't working?

1) Are you receiving data in the Console Output window that shouldn't be there during debugging?
2) Are you missing expected data in the Console Output window during debugging?
3) Are you getting yellow bangs or red ' x 's in the Console Editor window, on the tabs of any classes that are open, or over the icon of a file in your Projects Panel (Only look at the classes you created or edited)?
4) Is the application not start or stopping properly?
5) Is the applications doing something else it isn't supposed to be doing?
1 votes has been placed for this debate.
Vote Placed by dsjpk5 5 days ago
dsjpk5
TheRealSpassky101distraffTied
Agreed with before the debate:--Vote Checkmark0 points
Agreed with after the debate:--Vote Checkmark0 points
Who had better conduct:--Vote Checkmark1 point
Had better spelling and grammar:--Vote Checkmark1 point
Made more convincing arguments:-Vote Checkmark-3 points
Used the most reliable sources:--Vote Checkmark2 points
Total points awarded:03