Ayush KumarforDSA in JavaScriptkrayush1109-dsa.hashnode.dev·Feb 20, 202401 Print Pattern - Basic Coding Question (JS)A. Simple Pattern 1.Print a horizontal line of stars. // ***** const horizontalLine = function (n) { let str = "" for (let i = 1; i <= n; i++) str += "*"; console.log(str); } horizontalLine(5) 2.Print a vertical line of stars. /...72 readsBasics DSAstar-patternAdd a thoughtful commentNo comments yetBe the first to start the conversation.