From 89f1604e7b80a7c16f6c37331d8648c806811b66 Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Tue, 9 Jul 2019 04:09:08 +0300 Subject: [PATCH] minor --- 1-js/13-modules/01-modules-intro/article.md | 2 +- 1-js/13-modules/02-import-export/article.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/1-js/13-modules/01-modules-intro/article.md b/1-js/13-modules/01-modules-intro/article.md index 789760fc..a746aa1a 100644 --- a/1-js/13-modules/01-modules-intro/article.md +++ b/1-js/13-modules/01-modules-intro/article.md @@ -296,7 +296,7 @@ There are two notable differences of external module scripts: ``` -2. External scripts that are fetched from another domain require [CORS](mdn:Web/HTTP/CORS) headers. In other words, if a module script is fetched from another domain, the remote server must supply a header `Access-Control-Allow-Origin: *` (may use fetching domain instead of `*`) to indicate that the fetch is allowed. +2. External scripts that are fetched from another origin (e.g. another site) require [CORS](mdn:Web/HTTP/CORS) headers, as described in the chapter . In other words, if a module script is fetched from another origin, the remote server must supply a header `Access-Control-Allow-Origin: *` (may use site domain instead of `*`) to indicate that the fetch is allowed. ```html diff --git a/1-js/13-modules/02-import-export/article.md b/1-js/13-modules/02-import-export/article.md index 8aa122f0..c08340c5 100644 --- a/1-js/13-modules/02-import-export/article.md +++ b/1-js/13-modules/02-import-export/article.md @@ -209,11 +209,15 @@ For instance, these are all perfectly valid default exports: export default class { // no class name constructor() { ... } } +``` +```js export default function(user) { // no function name alert(`Hello, ${user}!`); } +``` +```js // export a single value, without making a variable export default ['Jan', 'Feb', 'Mar','Apr', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; ```