How do I know the IP address assigned to an ESP8266?
If you give your board a name with

WiFi.hostname("MyESP8266");


(for example) you can then look on your router in the section that lists DHCP assignments (on my Netgear it's Attached Devices). That should then show you the IP address of all the attached devices, including the ESP8266 which you will easily identify by its name.

Another option is to use mDNS. Look at some of the examples that come with the ESP8266 core and libraries to see how.