Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
(function() {
  var weiredChar = String.fromCharCode(57344);
String.prototype.replaceAll = function(replace_what, replace_with) {
    
    var a = '';
    var b = this;
    do {
      a = b;
      b = a.replace(replace_what, weiredChar);
    } while (a !== b)
    
    do {
      a = b;
      b = a.replace(weiredChar, replace_with);
    } while (a !== b)
      
    return b;
};
})();
console.log("Hallo".replaceAll('l', '-ll-'));
Output 300px

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

Dismiss x
public
Bin info
anonymouspro
0viewers