| *** ledmer_ has quit (None) | 02:37 | |
| scooper | Good afternoon ledmer | 02:38 |
|---|---|---|
| scooper | Let me check the repository to see | 02:38 |
| scooper | yes | 02:39 |
| scooper | you did luis | 02:39 |
| ledmer | hi | 02:39 |
| scooper | did you work on some part of the project | 02:40 |
| ledmer | are we talking here or in the personal message | 02:40 |
| ledmer | ? | 02:40 |
| scooper | what you think?? | 02:41 |
| ledmer | here its fine | 02:41 |
| ledmer | well | 02:41 |
| scooper | let go in the personal message section | 02:41 |
| *** scooper has quit (Quit: Leaving) | 03:58 | |
| *** ledmer has quit (Quit: Leaving) | 03:59 | |
| *** shmohamud has quit (Ping timeout: 480 seconds) | 11:29 | |
| *** mulbah has quit (Remote host closed the connection) | 18:11 | |
| *** mulbah has quit (Remote host closed the connection) | 18:46 | |
| *** mulbah has quit (Ping timeout: 480 seconds) | 19:31 | |
| *** sysadmin_ has quit (None) | 20:02 | |
| shmohamud | Hi scooper | 20:05 |
| scooper | Hi Shanun | 20:06 |
| shmohamud | do you have any questions before we start today's lesson? | 20:06 |
| scooper | Sorry for yesterday my router batter last for at least 30 to 45 minuntes | 20:06 |
| shmohamud | no worries, I figure something came up | 20:06 |
| scooper | No for now | 20:07 |
| scooper | *battery | 20:07 |
| shmohamud | Can you write me a function declaration that takes in a name parameter and logs out "Hello {name}" to the console? | 20:07 |
| scooper | ok | 20:08 |
| scooper | function userName(name){ | 20:11 |
| scooper | console.log("Hello " + name) | 20:11 |
| scooper | } | 20:11 |
| scooper | userName("Spencer"); | 20:11 |
| shmohamud | Well done! | 20:11 |
| scooper | Thanks | 20:11 |
| shmohamud | can you think of another name for the function? Remember, you should try to use verbs when naming a function because they're usually performing an action | 20:12 |
| scooper | yes | 20:12 |
| shmohamud | lets hear it | 20:13 |
| scooper | function studentName(name){ | 20:14 |
| scooper | console.log("Hello " + name) | 20:14 |
| scooper | } | 20:14 |
| scooper | studentName("Spencer"); | 20:14 |
| shmohamud | what's the function actually doing? | 20:14 |
| shmohamud | better, but I want to work in a verb to the name. | 20:14 |
| scooper | the function studentName is indicating that this function is about a person and that person is a student | 20:15 |
| shmohamud | studentName is better than userName. What is the function actually doing though? | 20:16 |
| shmohamud | don't overthink it, just explain in your own words what the function is doing | 20:18 |
| scooper | The function that was defined about is telling a user that this function | 20:18 |
| scooper | is being define to world a person who title is a student | 20:19 |
| shmohamud | There's only one line in the function body. What does that line do? | 20:19 |
| scooper | is being define to welcome a person | 20:19 |
| shmohamud | ok, that's close | 20:19 |
| shmohamud | what is console.log("Hello " + name) doing? | 20:20 |
| scooper | in the function body it's welcoming a person who title is a student | 20:20 |
| scooper | printing out the name of a student | 20:20 |
| shmohamud | ok, so how about we call it welcomePerson or sayHello? | 20:20 |
| scooper | that naming convention is not bad too | 20:21 |
| shmohamud | yes, the key is that for functions, you want to have a verb in it. Welcome is a verb, Say is a verb | 20:22 |
| shmohamud | So, can you write me the same function except make it an arrow function? | 20:23 |
| scooper | is a verb | 20:23 |
| shmohamud | what's a verb? | 20:24 |
| scooper | A verb is a word that show or convey action | 20:25 |
| shmohamud | yes | 20:25 |
| shmohamud | so can you rewrrite the function declaration as an arrow function? | 20:25 |
| scooper | ok | 20:26 |
| scooper | yes | 20:27 |
| *** shmohamud has quit (Remote host closed the connection) | 20:30 | |
| scooper | studentName = (name) => { | 20:30 |
| scooper | console.log("Hello " +name) | 20:30 |
| scooper | } | 20:30 |
| scooper | studentName("Spencer Cooper"); | 20:30 |
| scooper | Shmohamud | 20:35 |
| scooper | are you still there?? | 20:35 |
| shmohamud | yes | 20:35 |
| shmohamud | have you rewritten the function? | 20:36 |
| scooper | yes | 20:36 |
| scooper | I send it already | 20:36 |
| shmohamud | Ok I disconnected for a second so I missed it | 20:36 |
| shmohamud | The logs show me though, looks good. However, what about the function name? | 20:37 |
| shmohamud | Can you name it using a verb? | 20:37 |
| scooper | ok | 20:37 |
| shmohamud | you don't want to name a function based on the parameter/argument. You want to name it based on the function body | 20:38 |
| scooper | sure | 20:38 |
| scooper | printName = (name) => { | 20:39 |
| scooper | console.log("Hello " +name) | 20:39 |
| scooper | } | 20:39 |
| scooper | printName("Spencer Cooper"); | 20:39 |
| shmohamud | awesome! I like it | 20:39 |
| shmohamud | So, do you have any questions for me now? | 20:40 |
| scooper | yes | 20:40 |
| shmohamud | Lets hear it | 20:41 |
| scooper | it's compulsory we name a function as a verb on base on what the function is doing???? | 20:41 |
| shmohamud | it's highly recommended | 20:41 |
| shmohamud | if a function is logging out "Hello {name}" then the function name should reflect that | 20:42 |
| shmohamud | if a function is adding two numbers, the function name should reflect that. | 20:42 |
| *** ledmer has quit (Read error: Connection reset by peer) | 20:42 | |
| shmohamud | it's not _required_ because we can name a function anything we want, but it makes the code more readable and maintainable because other developers will understand what the function is doing without reading too closelh | 20:43 |
| scooper | ok recommendation accepted | 20:43 |
| shmohamud | :) | 20:44 |
| shmohamud | any other questions for me? | 20:44 |
| scooper | no for now | 20:44 |
| scooper | any question for me from your end??? | 20:44 |
| shmohamud | Nope, you did great today. I'm going to take my mother out for her birthday now | 20:45 |
| shmohamud | Keep practicing in between our sessions. I'm already seeing excellent improvement. | 20:45 |
| scooper | Thanks Sahnun | 20:46 |
| scooper | you push me a lot to do this | 20:46 |
| shmohamud | You're welcome. It's a pleasure to learn with you. | 20:47 |
| scooper | I m leaving you now to have a session with ledmer/luis so we can work on our project... | 20:47 |
| shmohamud | Sounds good. Have a good session and see you tomorrow or this weekend | 20:47 |
| scooper | ok | 20:47 |
| scooper | ACTION signing in to talk with Luis | 20:48 |
| scooper | Luis Are you still there???? | 20:48 |
| *** shmohamud has quit (Remote host closed the connection) | 20:52 | |
| ledmer | yeah hello | 20:52 |
| ledmer | I was paying attention to the private chat notifications | 20:53 |
| scooper | ok | 20:53 |
| scooper | let go ther | 20:53 |
| scooper | there | 20:53 |
| *** shmohamud has quit (Ping timeout: 480 seconds) | 21:01 | |
| *** Julian has quit (None) | 21:22 | |
| *** scooper has quit (Quit: Leaving) | 21:32 | |
| *** ledmer has quit (Quit: Leaving) | 21:37 | |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!