26 lines
972 B
Markdown
26 lines
972 B
Markdown
---
|
||
title: Naming Convention for JavaScript
|
||
localeTitle: تسمية الاتفاقية لجافا سكريبت
|
||
---
|
||
هنا سوف تحصل على نظرة عامة على حالات الأكواد المختلفة التي يتم استخدامها على نطاق واسع.
|
||
|
||
## camelCase
|
||
|
||
في البرمجة ، يبدو تنسيق camelCase لأسماء المتغيرات كما يلي:
|
||
|
||
`var camelCase = "lower-case first word, capitalize each subsequent word";
|
||
`
|
||
|
||
## PascalCase
|
||
|
||
PascalCase (أو CamelCase) هو البديل من camelCase. وهو يختلف عن camelCase من خلال الاستفادة من كل كلمة ، _بما_ في _ذلك_ الكلمة الأولى:
|
||
|
||
`var PascalCase = "upper-case every word";
|
||
`
|
||
|
||
## snake\_case
|
||
|
||
هناك حالة شائعة أخرى تسمى snake\_case تفصل كل كلمة بها شرطات سفلية بهذه الطريقة:
|
||
|
||
`var snake_case = "lower-case everything, but separate words with underscores";
|
||
` |