Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://rawgit.com/lodash/lodash/3.0.1/lodash.min.js"></script>
  <meta charset="utf-8">
  <title>lodash random() method</title>
</head>
<body>
  <h1>Sandeep Kumar Patel</h1>
  <button onclick="applyRandomColor()">Apply Random Color</button>
<script>
  //Generates random color
  function applyRandomColor(){
    var red = _.random(0, 255),
        green = _.random(0, 255),
        blue = _.random(0, 255);
    document.querySelector("h1").style.color= "rgb("+red+","+green+","+blue+")";
  }
</script>
</body>
</html>
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers