Connect ESP8266 to a WIFI network

The esp8266 operates on the 2.4ghz frequency.
A basic sketch to establish a connection to a wifi network is as follows:

#include <ESP8266WiFi.h>

//SSID of your network
char ssid[] = "<Wifi SSID>";
char pass[] = "<Wifi Password>";

void setup(){
  Serial.begin(115200);
  delay(10);

  // Connect to Wi-Fi network
  Serial.print("Connecting to...");
  Serial.println(ssid);
  WiFi.begin(ssid, pass);

  //wait till connection established
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  
  //let me know that connection is established
  Serial.println("");
  Serial.println("Wi-Fi connected successfully");
}

//loop to handle http requests or whatever else you would like
void loop () {}