title: Is there any way to efficiently express the Javascript code like the chaining method in JQuery?
body: <p>In jQuery, we can run multiple methods within a single statement in order to efficiently express the jQuery code:</p>
  
  <pre><code>$("#p1").css("color", "red").html("Hello world!").attr("class","democlass");
  </code></pre>
  
  <p>And how about Javascript?</p>
  
  <pre><code>document.getElementById("p1").style.color = "red";
  document.getElementById("p1").innerHTML = "Hello world!";
  document.getElementById("p1").setAttribute("class","democlass");
  </code></pre>