(a) The juvenile court shall have jurisdiction to act as a court of inquiry with all the powers and rights allowed courts of inquiry in this state and to examine or investigate into the circumstances or causes of any conduct or acts of any person 17 or more years of age that may be in violation of the laws of this state whenever such person is brought before the court in the course of any proceeding instituted under this chapter. The court shall cause the person to be apprehended and brought before it upon either a writ of summons, a warrant duly issued, or by arrest.
(b) When, after hearing evidence, the court has reasonably ascertained that there is probable cause to believe that the person has committed a misdemeanor or felony as prescribed under the laws of this state, the court shall commit, bind over to the court of proper jurisdiction in this state, or discharge the person. When justice shall require, the court shall cause the person to make such bail as the court shall deem proper under the circumstances and to cause the person to appear before the court of proper jurisdiction in this state to be acted upon as provided by law.