this post was submitted on 16 Nov 2023
139 points (98.6% liked)
Very Real Tech Pics
1302 readers
1 users here now
There's no place like 127.0.0.1
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
That code wouldn't work, the variable hack is never set.
Except that's how you write JavaScript embedded in html. At least that was the way when there were browsers that didn't know the
script
-tag.No, the variable
code
is set to a string of “hack”The code will work, but will just run the course of the
else
path and replace all the HTML with bold text that says “Unknown ResoAnd whatever else that cut off string contains
You are right. I honestly stopped reading halfway through, just assumed they were all else if's
right at the top, it is set to
var code
var code is set to hack. Though the code would run didn't notice the lace condition is an else not an else if
I wasn't being serious. Lace condition sounds scandalous.