freeCodeCamp/guide/arabic/javascript/template-literals/index.md

664 B

title localeTitle
Template Literals قالب حرفية

Template Literals هي ميزة ES6 تستخدم charter backtick لتعريف قيمة سلسلة

التركيب الأساسي

فيما يلي مثال أساسي على قالب حرفية:

``// ES5 syntax var es5String = "ES5 String" var es5StringWithVariable = "ES5 String with a " + variable + "..."

// ES6 template literal const tempLit = Simple string

// ES6 template literal with variable let tempLitWithVariables = Simple string with a ${variable}...

// ES6 multiple line template literal const multiLineString = Multiple Lines Allowed ``