Spawn prefabs randomly

Hello.I am new to coding in Unity and coding in general .
So I am trying to spawn 2 prefabs randomly from 8 ;spawners; , each one near the other(in 2D mode ), they are placed horizontally on the top of the screen.
currently I am using this script which is attached to the gameobject controlled by the player

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class randomballbomb2 : MonoBehaviour 
{
	public Transform[] teleport;
	public GameObject[] prefeb;
	// Use this for initialization
	void Start () 
       {
		for (int i=0;i<=50;i++){
			SpawnPrefeb();
		}
	}

	// Update is called once per frame
	void Update () {

	}
	void SpawnPrefeb(){
		int tele_num = Random.Range (0, 7);
		int prefeb_num = Random.Range (0, 2);
		Instantiate (prefeb [prefeb_num], teleport [tele_num].position, teleport [tele_num].rotation);

	}
}

but this spawns 50 random prefabs all at the same time…when I press play , 50 balls and bombs appear
Any help please?

You are calling SpawnPrefab() 50 times at the start with randomly prefab[1-2], so you get what you asked for. What exactly do you want to achieve? 50 random bombs or balls spawned evert second? Then you need to call SpawnPrefab() in the Update(), and use some kind of timer that is reset every second.

You need to use coroutines if you want to add a delay to your code Unity - Manual: Coroutines

void Start () {
    StartCoroutine(SpawnStuff());
}

private IEnumerator SpawnStuff() {
    for (int i = 0; i < 50; i++) {
        SpawnPrefeb();
        yield return new WaitForSeconds(1f);
    }
}