Inherited from Old Italian cotesto, from Old Italian cotevesto, contracted from a Vulgar Latin introductory locution *eccum tibi istum; compare *eccum iste whence Italian questo.
Practice speaking and memorizing "codesto" and many other words and sentences in Italian.