انتقل إلى محتوى الدرس
فقرة فرعية #2 من درس: Arrow Function

Examples

سنتعرف في هذا الدرس علي نوع جديد من الدوال وهو arrow function

1 صفوف تعليمية
جافا سكريبت
3,058 مشاهدة

شرح صفوف ومحتوى الفقرة

الصف 1 شرح توضيحي

Before

HTML
hello = function() {
  return "Hello World!";
}

With Arrow Function

HTML
hello = () => {
  return "Hello World!";
}

Arrow Functions Return Value

HTML
hello = () => "Hello World!";

Arrow Function With Parameters

HTML
hello = (val) => "Hello " + val;

Arrow Function Without Parentheses

HTML
hello = val => "Hello " + val;

جميع فقرات هذا الدرس (Arrow Function)