I want to connect a modem to a router and well the ethernet cord isnt long enough to go to the 1st floor so im trying to make it go threw a window and see if it reaches that way but does the internet work that way is there any problem if i take the ethnet out a window to connect to the router.
Buy a longer cord 100ft ones you can generally get for under $10.
In general it will make little difference if the cable is outside. Mostly your issue would be if it got water inside but all the wires are plastic coated and the outside jacket will also keep water out.
I have one running up a pole to a camera that has been there for many years with no issues.
They do make outdoor cable that is filled with a gel but it is more used when you bury the cable.