For instance:
eval("alert('Hello there!');");
// is just as bad as?
window.location.href = "javascript:alert('Hello there!');void(0);";
For instance:
eval("alert('Hello there!');");
// is just as bad as?
window.location.href = "javascript:alert('Hello there!');void(0);";
Yeah, that's the same : the string after "javascript:"
is evaluated to be executed.
At least the first bad solution is more direct and obvious...
For a more general insight about why eval is evil, I'd redirect you to this other SO question.
But why would you use this kind of things ? It's very very hard to find a legitimate case where it would simplify your code.