My App is hybrid app, i want to write a same piece of code, so that it could run both in android and iOs real devices.Is it possible?

My App is hybrid app, i want to write a same piece of code, so that it could run both in android and iOs real devices.Is it possible?