> For the complete documentation index, see [llms.txt](https://mikkicoding.mikkipastel.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mikkicoding.mikkipastel.com/introduction-of-programming/05-intro-basic-coding.md).

# Basic Coding

## Data type

ประเภทของตัวแปรในแต่ละภาษาจะมีคล้ายๆกัน เช่น

* Number : ตัวเลขต่างๆ `int`, `float`, `double`, `long`
* Char : ตัวอักษร
* String : ตัวหนังสือ
* Boolean : ส่วนใหญ่มีค่า true และ false เท่านั้น
* List, ArrayList

## Condition & Loop Statement

การเขียนโปรแกรมหลักๆ

* **Condition**

เป็นการเขียนโปรแกรมเพื่อเลือกอย่างใดอย่างหนึ่ง เช่น การเลือกประเภทของสัตว์ ถ้าผู้ใช้เลือกสุนัข โปรแกรมก็จะแสดงผลชื่อสายพันธุ์ของสุนัข เป็นต้น

syntax ที่ใช้หลักๆ คือ if-else, switch-case

* **Loop Statement**

เป็นการสั่งให้โปรแกรมทำงานคำสั่งเดิมซํ้าๆ ตามจำนวนรอบที่เราต้องการ เช่น การให้หุ่นยนต์วิ่งรอบสนาม

syntax ที่ใช้หลักๆ คือ for, while, do-while
