diff --git a/subjects/lines/README.md b/subjects/lines/README.md index 37b73ea51..8ad682e1c 100644 --- a/subjects/lines/README.md +++ b/subjects/lines/README.md @@ -9,35 +9,35 @@ Also the single and double quote delimited strings can't actually have literal new lines: ```js -let fewlines = '\nHellođź‘Ź\nTheređź‘Ź\n' -// Same string but with litteral new lines: +let fewlines = "\nHellođź‘Ź\nTheređź‘Ź\n"; +// Same string but with literal new lines: let usingLiteral = ` Hellođź‘Ź Theređź‘Ź -` +`; ``` You can use the literal `\n` character to split text on each lines: ```js -let splited = ` +let splitted = ` Hellođź‘Ź Theređź‘Ź -`.split('\n') +`.split("\n"); -console.log(splited) // ['','Hellođź‘Ź','Theređź‘Ź', ''] +console.log(splitted); // ['','Hellođź‘Ź','Theređź‘Ź', ''] // Note that empty lines becomes empty strings ! ``` ### Instructions -You have been recruted to analyse a bunch of poems, your first task is to count +You have been recruited to analyse a bunch of poems, your first task is to count the number of lines. - Declare a variable `linesCount` of the number of lines from the provided `poem` variable. -But you must ignore empty lines in the begining and the end using the `trim` +However, you must ignore empty lines in the beginning and the end using the `trim` string method. ### Notions