You can ask your guitar teacher or, of course, friends if they can lend you an electric guitar to start with. Some music shops also offer this service.
If you really want to try out an electric guitar first, you can also use the dealers' return service or test your guitar in a music shop.