function resize() {
    var width = window.innerWidth, height = window.innerHeight;
    svg.attr("width", width - 20).attr("height", height - 20);
    rect.attr("width", width - 20).attr("height", height - 20);
  }
// Finally, specify the resize behavior:
Finally, specify the resize behavior.
Finally specify the resize behavior .
function resize() {
    var width = window.innerWidth, height = window.innerHeight;
    svg.attr("width", width - 20).attr("height", height - 20);
    rect.attr("width", width - 20).attr("height", height - 20);
  }
function resize ( ) { var width = window . innerWidth , height = window . innerHeight ; svg . attr ( "width" , width - 20 ) . attr ( "height" , height - 20 ) ; rect . attr ( "width" , width - 20 ) . attr ( "height" , height - 20 ) ; }
Finally, specify the resize behavior:
Finally specify the resize behavior :