diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/660ae3eeef9ad289bece426b.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/660ae3eeef9ad289bece426b.md index d03b09f50a8..a40f4e12bff 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/660ae3eeef9ad289bece426b.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/660ae3eeef9ad289bece426b.md @@ -17,7 +17,7 @@ Here is the basic syntax: () => {} ``` -To create a named arrow function, you can assign the function to a variable: +By assigning the arrow function definition to a variable, you bind it to an identifier. ```js const exampleFunction = () => { @@ -25,23 +25,23 @@ const exampleFunction = () => { } ``` -Create a new named arrow function called `printGreeting`. Inside the body of that function use the `console.log()` method to print the string `"Hello there!"`. +Create a new arrow function and assign it to the variable `printGreeting`. Inside the function body, use the `console.log()` method to print the string `Hello there!`. # --hints-- -You should have a function called `printGreeting`. +You should have a variable named `printGreeting` and assign it an arrow function. ```js assert.isFunction(printGreeting); ``` -You should use arrow syntax to create the `printGreeting` function. +You should create an arrow function and assign it to the `printGreeting` variable. ```js assert.match(code, /(let|const)\s+printGreeting\s*=\s*\(.*\)\s*=>\s*{\s*[\s\S]*}\s*;?/) ``` -Your `printGreeting` function should include a `console.log('Hello there!')`. +Your `printGreeting` function should log `Hello there!` to the console. ```js assert.match(printGreeting.toString(), /console\.log\(['"]Hello\s+there!['"]\)/);