Comparing TypeScript and JavaScript: A Detailed Analysis