13 lines
517 B
Markdown
13 lines
517 B
Markdown
|
---
|
||
|
title: Constructing Strings with Variables
|
||
|
localeTitle: بناء سلاسل مع المتغيرات
|
||
|
---
|
||
|
## بناء سلاسل مع المتغيرات
|
||
|
|
||
|
إضافة المتغيرات التي تخزن السلاسل ، لإنشاء سلاسل أطول. تأكد من صحة التهجئة والمسافات.
|
||
|
|
||
|
`var myName = "Bobby";
|
||
|
var myFavLetter = "B";
|
||
|
var sentence = "Hello, I'm " + myName + ". My favorite letter is " + myFavLetter + ".";
|
||
|
//The result is "Hello, I'm Bobby. My favorite letter is B.
|
||
|
`
|