Yes, you can use iPhone 6 charging cords with the iPhone X as iPhone X comes up with two charging mode wireless charging and the pin charging. You can use or old charging cable. However, don’t expect that it will charge at very rapidly because it will not for fast charging you need purchase the latest cables available in the Apple center.
That doesn’t mean iPhone X doesn’t offer fast charging it offers but the fast charging is not possible traditional iPhone 6 cords. Well, the charging speed isn’t that bad as it hardly takes around 70-80 minutes to fully charge up your device.
"Hope it was informative"