| @@ -332,4 +332,7 @@ Update `.getValue()` to | |||
| 1. Return the number of characters the user has typed (`r github_sha_link("b3958d5e3f60fbac3a0100673696bd413a276fb4")`) | |||
| 1. Return the number of words the user has entered | |||
| 1. Return the number of words the user has entered (`r github_sha_link("e3fa485bb60853e391302289213d3cd5f0846b3e")`) | |||
| 1. Create variables for both number of characters and words and return both | |||
| in an object | |||
| @@ -16,7 +16,10 @@ $.extend(typingSpeed, { | |||
| // your input. In this function, find or construct the value that will be | |||
| // returned to Shiny. The ID of `el` is used for the inputId. | |||
| return el.value.split(' ').length; | |||
| const nchar = el.value.length; | |||
| const nword = el.value.split(' ').length; | |||
| return {nchar, nword}; | |||
| }, | |||
| setValue: function(el, value) { | |||
| // This method is used for restoring the bookmarked state of your input | |||