diff --git a/exercises/8_start_templating/problem.md b/exercises/8_start_templating/problem.md index 0db4ac6..78e1873 100644 --- a/exercises/8_start_templating/problem.md +++ b/exercises/8_start_templating/problem.md @@ -5,7 +5,8 @@ Let's do a little bit of templating! * * * ## Lead the Way ## For this mission, let me show you the `template` function. -_template() gives you access to simple and powerfull micro-templating with Lo-Dash. +_template() gives you access to simple and powerfull micro-templating +with Lo-Dash. ```js _.template(text, data) @@ -31,9 +32,9 @@ a simple var for us: login: [ 1407574431, 140753421 ] } ``` -We want a simple string greeting the user by name and showing the number of times -the user has logged in (every timestamp represents one login). Your -function should return a String like this: +We want a simple string greeting the user by name and showing the +number of times the user has logged in (every timestamp represents +one login). Your function should return a String like this: ``` Hello Foo (logins: 2) diff --git a/exercises/9_todo_template/problem.md b/exercises/9_todo_template/problem.md index ee09e1a..f5d9eec 100644 --- a/exercises/9_todo_template/problem.md +++ b/exercises/9_todo_template/problem.md @@ -13,7 +13,7 @@ the same as ``. ```js var mytemplate = '<% _.forEach(data, function(item){ %>' + '
  • <%= item %>
  • ' + -'<% }); %>'; + '<% }); %>'; _.template(mytemplate, {data: [1, 2, 3]}); /* @@ -28,8 +28,8 @@ Javascript. Isn't that awesome? As a third parameter, `template()` accepts a options object. One of the options I really like and want to show you is `option.imports`. -With `options.imports`, you can define an object to describe values to import into the -template as local variables. +With `options.imports`, you can define an object to describe values +to import into the template as local variables. #### Example #### ```js @@ -38,7 +38,8 @@ var ucfirst = function (str) { return f + str.substr(1); }; -_.template('Hello <%= ucfirst(foo) %>', {foo: "mike"}, { 'imports': { 'ucfirst': ucfirst } }); +_.template('Hello <%= ucfirst(foo) %>', {foo: "mike"}, + { 'imports': { 'ucfirst': ucfirst } }); // Hello Mike ``` @@ -74,8 +75,8 @@ We have a JSON of different to-do's: ] } ``` -We want to create a simple nested `