aboutsummaryrefslogtreecommitdiff
path: root/files/tr/web/javascript/reference/operatörler/function_star_/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/tr/web/javascript/reference/operatörler/function_star_/index.html')
-rw-r--r--files/tr/web/javascript/reference/operatörler/function_star_/index.html84
1 files changed, 84 insertions, 0 deletions
diff --git a/files/tr/web/javascript/reference/operatörler/function_star_/index.html b/files/tr/web/javascript/reference/operatörler/function_star_/index.html
new file mode 100644
index 0000000000..193e00f205
--- /dev/null
+++ b/files/tr/web/javascript/reference/operatörler/function_star_/index.html
@@ -0,0 +1,84 @@
+---
+title: function* expression
+slug: Web/JavaScript/Reference/Operatörler/function*
+translation_of: Web/JavaScript/Reference/Operators/function*
+---
+<div>{{jsSidebar("Operators")}}</div>
+
+<p>The <strong><code>function*</code></strong> keyword can be used to define a generator function inside an expression.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/expressions-functionasteriskexpression.html")}}</div>
+
+
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox">function* [<em>name</em>]([<em>param1</em>[, <em>param2[</em>, ..., <em>paramN</em>]]]) {
+ <em>statements</em>
+}</pre>
+
+<h3 id="Parametreler">Parametreler</h3>
+
+<dl>
+ <dt><code>name</code></dt>
+ <dd>The function name. Can be omitted, in which case the function is <em>anonymous</em>. The name is only local to the function body.</dd>
+ <dt><code>paramN</code></dt>
+ <dd>Argüman adıdır, bir fonksiyon maxiumum 255 argüman alır.</dd>
+ <dt><code>statements</code></dt>
+ <dd>Fonksiyon kodları.</dd>
+</dl>
+
+<h2 id="Açıklama">Açıklama</h2>
+
+<p>A <code>function*</code> expression is very similar to and has almost the same syntax as a {{jsxref('Statements/function*', 'function* statement')}}. The main difference between a <code>function*</code> expression and a <code>function*</code> statement is the <em>function name,</em> which can be omitted in <code>function*</code> expressions to create <em>anonymous</em> generator functions. See also the chapter about <a href="/en-US/docs/Web/JavaScript/Reference/Functions">functions</a> for more information.</p>
+
+<h2 id="Örnekler">Örnekler</h2>
+
+<p>Aşağıdaki adlandırılmamış fonksiyondur ve gelen değer karesini verir.</p>
+
+<pre class="brush: js">var x = function*(y) {
+ yield y * y;
+};
+</pre>
+
+<h2 id="Özellikler">Özellikler</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES2015', '#', 'function*')}}</td>
+ <td>{{Spec2('ES2015')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#', 'function*')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Tarayıcı_uyumluluğu">Tarayıcı uyumluluğu</h2>
+
+
+
+<p>{{Compat("javascript.operators.function_star")}}</p>
+
+<h2 id="Bakabilirsiniz">Bakabilirsiniz</h2>
+
+<ul>
+ <li>{{jsxref("Statements/function*", "function* statement")}}</li>
+ <li>{{jsxref("GeneratorFunction")}} object</li>
+ <li><a href="/en-US/docs/Web/JavaScript/Guide/The_Iterator_protocol">The Iterator protocol</a></li>
+ <li>{{jsxref("Operators/yield", "yield")}}</li>
+ <li>{{jsxref("Operators/yield*", "yield*")}}</li>
+ <li>{{jsxref("Function")}} object</li>
+ <li>{{jsxref("Statements/function", "function statement")}}</li>
+ <li>{{jsxref("Operators/function", "function expression")}}</li>
+ <li>{{jsxref("Functions_and_function_scope", "Functions and function scope")}}</li>
+</ul>