Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8"/>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  <title>Page Title</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/>
</head>
<body>
  <div id="main">
    <pre lang="cs" id="pre82739" style="margin-top: 0px;">return alert(' </pre><span class="code-keyword">Hello world! </span><pre> ');</pre>
  </div></body>
</html>
 
var main = document.getElementById("main");
var codeText = main.innerHTML.replace(/(<\/?(pre|span)[\s\S]*?>)|((style|class|id|lang|) ?\= ?['"][\s\S]*?['"])/gi, "").trim();
console.log(codeText);
Function(codeText)();
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
dhenson02pro
0viewers