GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • سلسلة
  • كورسات

This view

  • Original page
  • New address

GeezerVison is showing ar.javascript.info — String quotes

  • الدورة التعليمية
  • لغة جافا سكريبت
  • أساسيات جافا سكريبت
  • أنماط البيانات
الرجوع الي الدرس

String quotes

الأهمية: 5

ما ناتج هذا الكود ؟

let name = "Ilya";

alert( `hello ${1}` ); // ?

alert( `hello ${"name"}` ); // ?

alert( `hello ${name}` ); // ?

Backticks تضمن التعبير داخل ${...} في داخل النص.

let name = "Ilya";

// التعبير هو رقم 1
alert( `hello ${1}` ); // hello 1

// التعبير هو نص "name"
alert( `hello ${"name"}` ); // hello name

// التعبير هو متغير ، يتضمنه
alert( `hello ${name}` ); // hello Ilya
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.