Pick a value from a wifi scan and use it after to compare

Once I added a Serial.begin() to your sketch and commented out a couple of lines I got

scan start
scan done
7 networks found
1: PLUSNET_Moonraker (-37)*
2: DIRECT-E4-HP ENVY Photo 6200 (-46)*
3: BTHomeHub2-NMNR (-80)*
4: TALKTALKA69C25 (-84)*
5: TALKTALK8765E6 (-85)*
6: SKYBI7DY (-90)*
7: Zyxel_9A21 (-96)*

On the Serial monitor. What do you get and what do you want to do with the data ? I assume that you want to do something with the WiFi.RSSI() value