If you have Windows with 'Ubuntu on Windows' (or are running Linux) then you can create your own build of Espruino from http://github.com/espruino/Espruino, which you can run on your PC (and communicate with from the IDE via Telnet). All the internet functionality will work, however obviously you won't be able to access anything in the real world.
You can buy official Espruino boards pretty cheaply ($25), or you can run the Espruino software on an ESP8266 (which costs around $5 for a USB connected board) - it'll just be a little less plug and play, and isn't officially supported by the creators.
Raspberry Pis are also very cheap ($10 for the Zero W with internet connectivity), but you'll have to factor in the cost of an SD card too.
If you really don't want a physical device, you can actually rent Raspberry Pis (eg. https://raspberry-hosting.com/en) or as Sudheesh mentioned in response to your post there are emulators as well.
However given the time you're likely to spend learning to use IoT devices, spending a few dollars buying hardware to use would be a very good investment.