Тёмный

var, let and const - What, why and how - ES6 JavaScript Features 

Fun Fun Function
Подписаться 263 тыс.
Просмотров 181 тыс.
50% 1

Наука

Опубликовано:

 

27 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 551   
@webapplication9086
@webapplication9086 7 лет назад
You are the most friendly instructor in the world
@funfunfunction
@funfunfunction 7 лет назад
+Web Application awwww thanks
@webapplication9086
@webapplication9086 7 лет назад
funfunfunction Can you give me your name on facebook?
@leandrogoncalvesdeoliveira9201
TIL: always use 'const'. If you *REALLY* need to change state, use 'let'. 'var' is dead. Thanks! ;)
@jordancotter5885
@jordancotter5885 8 лет назад
would 'let' still be useful because of the way it's scoped? ...regardless if you need to change it?
@pajn
@pajn 8 лет назад
const has the same scoping as let
@leandrogoncalvesdeoliveira9201
'const' is block scoped like 'let' :} awesome feature! (function () { const a = 3; if (true) { const a = 5; // no error, block scoped! console.log(a); // outputs 5 } console.log(a); // outputs 3 })();
@jordancotter5885
@jordancotter5885 8 лет назад
That isn't true Rasmus. const will behave like so: if (true) const x = 5; console.log (x);//5 While let would behave differently: if (true) let x = 5; console.log (x)//Block-scoped declaration
@leandrogoncalvesdeoliveira9201
MDN says 'const' behave like 'let', Jordan. (developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) (function () { var x = 'nope'; if (true) { // block-level const x = 23; console.log(x); // 23 } console.log(x); // 'nope' if (true) { // block-level let x = 42; console.log(x); // 42 } console.log(x); // 'nope' })();
@mikeyscimeca
@mikeyscimeca 7 лет назад
Thank you so much for making these videos. I have learned so much and have been entertained with your jokes. Thank you Thank You Thank You.
@funfunfunction
@funfunfunction 7 лет назад
thanks michael, that's exactly the kind of response I was aiming for! Thanks for following the channel!
@battosaijenkins946
@battosaijenkins946 7 лет назад
@funfunfunction, Hi sir With all due respect I believe that var, let, and const all have a time and a place. To say that var is no longer used, let should take its place, and const should be everywhere I simply disagree. Yes let should be used for block scoping but I really have to say that const is being overused. If you want your object/code to not change, simply think a bit more about the outcome of your code ahead of time to prevent unforseen errors or even worse coding yourself into a corner. And also, as my professor says const should be something you know will never change, for example PI, gravitational acceleration, Euler's constant etc... In other words, use it when you know variables will never change, dont just assume its better than var. That is all, thank you~
@zsoltoroszlany7172
@zsoltoroszlany7172 8 лет назад
I have to admit I failed to understand what is hoisted ... until now, many thanks for you. I really enjoyed your tutorial video. Thank you again!
@YoungMesrine
@YoungMesrine 5 лет назад
Pls what is hoisted?
@acskck
@acskck 4 года назад
@Midas / XIV what he said is not the actual thing happening at all. Your code will not be moved to top. This behavior is due to something called execution context. It has 2 stages, creation stage and execution stage. Since JS interpreter is single threaded, it needs to have a execution stack in order to keep track of what is being executed and a execution context is created for global and each function it executes. While in the creation stage, it will create global object, determine the value of "this" and also it will scan through the code and put variable declarations and functions to the memory. So when the execution stage comes, those declared variables (not their values) and functions are already available in the memory. Hence it feels like those declarations are moved to the top of the code.
@Chocoholic1337
@Chocoholic1337 8 лет назад
Tip for the arm/hand pain: Do hand exercises! Do a RU-vid search for 'gaming hand exercise' and you'll find what you need. Just do this every 30-60 minutes for a couple of minutes... you'll notice a world of difference! Thank you for the video. As always, great content!
@ricardo.mazeto
@ricardo.mazeto 8 лет назад
That's Sort of what I do.
@janklosowski
@janklosowski 8 лет назад
Foosball works great.
@atxaqualion75
@atxaqualion75 8 лет назад
Good stuff. Immutability is really key to taking advantages of higher level programming languages that can parallel process your code without explicitly defining how the parallel processing occurs. This is why functional programming languages such as Scala, Clojure, etc. are gaining traction. I've been using JavaScript for 20 years and several of your JavaScript-centric episodes teach me something new about how things work "under the hood". Thanks mpj.
@SayuStrife
@SayuStrife 8 лет назад
Brilliant Video. The talk about mutable state will definately help me design my code better going forward.
@funfunfunction
@funfunfunction 8 лет назад
glad to hear it!
@erickvoodoo1993
@erickvoodoo1993 8 лет назад
Thank you! I've been waited for next lesson about ES6 features and now I have it!
@qwarlockz8017
@qwarlockz8017 8 лет назад
First off of course... thanks so much for your great videos! I really enjoy them. Programmers are getting this now but historically this was a condition that pianists got. This has been topic of conversation for pianists for since the first piano was built. Some of the advice is to have your arm parallel to the floor and to keep your wrist straight (so as to not cut off blood or restrict the nerves) an d to let the weight of your arm or hand coming down (ie gravity) is what provides the force to hit the keys not forcing the arm down. Lots of books on piano technique out there that all programmers should look at.
@rdagger
@rdagger 8 лет назад
I had bad wrist pains from long days at the computer. I cured it by adding dumbbell wrist curls and reverse wrist curls to my workouts. 4 sets of 12 reps with light weights, 3 times a week. I also use gel keyboard and mouse wrist rests to try to keep my wrists in the same plane as my forearm. I’ve been wrist pain free for several years. Now would be a good time to also add some preventive shoulder exercises because that is another very bad consequence of too much desk work.
@nickwoodward819
@nickwoodward819 6 лет назад
yeah, i had wrist issues (see above), that terminated (and relieved) just between the shoulder blades. definitely all connected
@Mikethealtarboy
@Mikethealtarboy 8 лет назад
Love your videos as always! I had some arm pain after starting my desk job - mostly in the forearm, and a little tingling around the ring finger. My solution was to make sure my chair was high enough that my arms were 90 degrees with my keyboard, and get a stand for my laptop so I wasn't looking down at it. The source of the problem was actually tight muscles up around my shoulders and neck, which resulted in a nerve being pinched. A little ointment on my shoulder when I found it getting tight helped too. It took a couple months but did get back to normal.
@sheriffderek
@sheriffderek 8 лет назад
This worked for me too. Why are desks and chairs so misaligned? codepen.io/sheriffderek/pen/gppRbd
@adamkucharik9189
@adamkucharik9189 8 лет назад
Another arm pain tip: In addition to posture and exercises, if you use a mouse, train your opposite hand so you can switch and give each hand/forearm a break. The first week of using the opposite hand was quite challenging for me. I became both physically and mentally tired quickly. But after the first week my accuracy and stamina was good enough for non-pixel perfect use.
@ahwaliazizi
@ahwaliazizi 6 лет назад
impressive... very smart, no keyboard strok sound, no nasty backgroud sounds, theroy plus practical, deep knowledge so deep explaination ....amazing video !
@funfunfunction
@funfunfunction 6 лет назад
Thank youu
@stevenwilson1890
@stevenwilson1890 8 лет назад
I'm not even a JS programmer, but your show is so well done I look forward to it and watch it every week! Thank you!
@funfunfunction
@funfunfunction 8 лет назад
+Steven Wilson wow, thanks! That means a lot!
@jamesmcginn6291
@jamesmcginn6291 7 лет назад
"It's so nice for something to be immutable." Great explanation. I loved the dishwasher analogy. Thank you!
@afitnessca
@afitnessca 6 лет назад
Hey just wanted to say thanks. I am a 3 years into Java development, was trained in one of the software development bootcamps and learned ruby. As JavaScript is taking over the world my knowledge about it was very basic, and your tutorials makes me interested to apply more of these principles. I do find your videos very engaging, very informative, clear and concise. Thank you.
@user-uj6le5fl9c
@user-uj6le5fl9c 7 лет назад
Great video sir! in terms of ergonomics: i used to experience what you described on a daily basis previously. What fixed it for my was: Have a chair which has a good straight sit mode (not hanging back nor too forwards) and make sure that your chair has armrests where your elbow can rest at height of about 2/3cm lower than your desk height. Also what is essential is using a mouse that suits your hand. It would shock you to know how many people use too small mice. A nice long mouse ergonomics wise is the Razer Deathadder. Again thanks for making these awsome video's for new aspiring JS devs and i hope your arm is okay again by now!
@SuperManitu1
@SuperManitu1 8 лет назад
Concerning your arm: I had something similar, bought a vertical mouse off amazon and Im very happy with it. No pain since then.
@atxaqualion75
@atxaqualion75 8 лет назад
I had a developer friend that also advocates a mouse that is similar to an orig Atari joy stick.
@SuperManitu1
@SuperManitu1 8 лет назад
If anyone else is interested, this is the one I bought: www.amazon.de/Delux-M618-Scroll-Rad-PC-Maus-2-Wege/dp/B00AYXUIO6 It seems that this very model is sold unter a bunch of different names, seems to be the same mouse though.
@TimothyWillis1981
@TimothyWillis1981 8 лет назад
Had an issue too, got a vertical mouse and made a place to rest my elbows, no more pain for me.
@error.418
@error.418 7 лет назад
Also consider a keyboard that allows tenting and splaying, it does the same thing as switching to a vertical. Combined, be pain free.
@nickwoodward819
@nickwoodward819 6 лет назад
you really don't need it though, at least not initally depending on your injury. most rsi comes over time (obviously.) so most is fixed by improving your wrists/arm/shoulder movements. powerball, stretches, nerve glide exercises. a vertical mouse aliviates the symptoms, it doesn't prevent them. :)
@enterteg
@enterteg 7 лет назад
I love the scenography in your room :) Great videos, great job! You are very inspiring, thanks a lot!
@koltonIII
@koltonIII 3 года назад
hell yes. this is they type of instructing i am looking for. thank you
@YanasChanell
@YanasChanell 7 лет назад
Thank you very much! You make clear things I've read about many times on my native language but couldn't understand.
@GordWayne
@GordWayne 5 лет назад
The best sound effects! You should bring them back for the newer episodes.
@vacprokop
@vacprokop 7 лет назад
I have learned two universal principles so far: minimize scope and don't reassign a variable. Well done with this episode!
@armenbakir112
@armenbakir112 6 лет назад
this guy rly help me through my biggest problem love you keep it up i am you a new fun
@OttoRobba
@OttoRobba 8 лет назад
For ergonomy - and this is something that has helped me immensely - you should look into compact mechanical keyboards. - Short distance between mouse and keyboard - Shortcuts for moving the cursors (stay in the home row) - Better typing feedback = less mistakes, more precision and less typing I'd recommend a Pok3r keyboard with brown switches or, for an endgame, comfortable keyboard, the Happy Hacking Keyboard Pro 2. Touchpad instead of mouse is pretty nice too, it helps in keeping the hand flatter instead of "claw-shaped" and avoids wrist movement.
@everydayhustle6641
@everydayhustle6641 8 лет назад
You have a really fun channel. You make learning very digestible, thanks!
@sab611
@sab611 8 лет назад
Hi MPJ Use your mouse with your left hand for a while. You get used to it after a bit. Also get a pad to lift up the base of your palm so your hand is parallel with your forearm, ie your wrist isn't bent backwards at all. Or have a high platform to use your mouse on which also stops your wrist getting bent. The only rear cure for RSI (repetitive strain injury) or Carpal Tunnel is rest. Turmeric is a good natural remedy for inflammation.
@sunilsandhu6717
@sunilsandhu6717 7 лет назад
Subscribed to your channel after coming across this video - super educational, super entertaining and supremely accessible - you the funkiest!
@patrickbarnes5853
@patrickbarnes5853 7 лет назад
Just discovered you today and can't stop watching. Great content and humor! Concerning arm pain: I had this and it was due to clicking on mouse buttons. Makes sense that extending a finger and mashing a button hundreds of times a day would cause RSI. Problem went away quickly and has stayed away for years when I replaced the mouse with, first, a Wacom tablet and later a magic track pad with tap to click enabled.
@davidbrewitz
@davidbrewitz 8 лет назад
I trained my left hand to be as efficient as my right hand using the mouse. It was annoying for the first week or two but you will appreciate being able too switch back and forth when one gets too painful. Its always good to have a backup. Thanks for the awesome vid's by the way!
@robertperry8588
@robertperry8588 8 лет назад
For the arm pain... I know people who said they had the same issue but switched keyboard styles to an alternative to qwerty and that fixed it for them. Also, I know you prefer very simple text editors, but a nice perk to vim is that your hands stay on home row during everything you do, so that you don't have to move your hands down to the arrow keys and Control keys as much
@alanosman444
@alanosman444 7 лет назад
Very very nice.. thanks for re-teaching me Javascript basics in the most fun way.
@rico042002
@rico042002 8 лет назад
Great explanation of 'let' and 'const'. I'm only a few months into JavaScript programming and this was a great tutorial on ES6
@ivofs
@ivofs 8 лет назад
Tips on dealing with arm pain (I'm not a doctor, just telling what I do since I had bad pain): 1) Workout - Sorry dev fellas but the body need some exercise. 2) Stretching - From time to time stop and do some streching (something like this: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Ub0UQpPzttc.html). 3) Trick your brain and try to use the mouse with the other hand. This is funny but you get used. 4) Make sure you have enough space at the table to support your forearm when you are typing and using the mouse. Cheers
@piratecourtney
@piratecourtney 7 лет назад
An ergonomic mouse from Amazon is great and you can find them for around 20$, also you can give yourself a self-deep tissue massage by putting strong pressure on the places in your arm where you feel pain. If you feel a crunch, then try to breathe through the pain and work it out. If it's in your hand it's probably originating in the shoulder or even the chest or back. You don't want to hurt the other hand by over-exerting it on the pressure, so I push my body against the source of the pain on a chair arm, corner of a wall, or the pole of the subway car when I'm going to work.
@mikedeakin7518
@mikedeakin7518 8 лет назад
I've been looking at ergonomics for a little while, and while I'm not an expert and definitely not a doctor (seriously, if you have any sort of regular pain; arm, wrist, legs, back, whatever; go see a doctor.) and lot of what's out there is speculation and hypothesis, but here's what I've learned. Step 1 is posture. I'm currently reading Deskbound (by Kelly Starrett) and the general theme is DON'T SIT! If possible, a standing desk with good posture should be more comfortable and better for you in the long run. If you need to sit, try an alternative to a chair such as a large ball (this will strengthen the core and align the spine naturally). REALLY need a chair? Make sure you're posture is tip-top, no slouching and no arching, and get up and move regularly (~every 15 mins). Desk height is also key, all the normal stuff. Keep the top of monitor at eye height, and the arms should be relaxed at 90 degrees, elbows just resting on the desk without lifting the shoulders. Don't use a wrist-rest! The weight of your forearm on your wrist, even padded, could exacerbate carpel tunnel issues more than help them! Weight should be spread as even as possible along the length of your arm. The mouse hand can pivot nicely from either the bony part of the wrist (pinkie side of the carpel tunnel) or the elbow. Speaking of mice, input devices! Vertical mice seem promising but I must say I'm not totally convinced (arms neutral, my palms rotate to point up, not inward or down). However, regular mice and touch-pads are known to be awful for wrist injuries. Everybody is different so if you know one mouse input gives you grief, try another (e.g. graphics tablets are a good option). One thing I've heard is to cycle through the input methods you have throughout the day. Keyboards are also an issue, for me in particular. A regular keyboard has my wrists in almost constant ulnar deviation (palms down, rotating outwards towards the pinkie) which gets very uncomfortable by the end of the day. A split/ergonomic keyboard should fix this (in theory) so I'm looking to get one asap. Hope this helps someone!
@jnfsmile
@jnfsmile 8 лет назад
Posture is the part they call static load. The second is repetitive action. What +funfunfunction describes sounds more like something that happens from continuous typing, or usage of the mouse. As you've pointed out - doctors are best (they can give you sick leave etc...)
@ricardo.mazeto
@ricardo.mazeto 8 лет назад
Hey, Interesting comment. Does this book says something about stretching?
@HarriMehtala
@HarriMehtala 5 лет назад
Exercising daily and taking breaks often is the only thing that works for me. It doesn't have to be anything special, just some 5 min of body-weight exercises. Don't forget to work on your core. Use handles for pushups if you're having wrist pain. And don't overdo it! It's better to do 5-8 pushups every morning and evening than to do 20 at once and then not be able to train at all the next day.
@pascovicidinmoscova
@pascovicidinmoscova 5 лет назад
I have a degree in Sports Forearm issue: inflamed muscles &&|| tendons Reason: Pronation of the hand while using the mouse and typing Forearm pain: 1. Mouse: Try a larger(as in taller) one that permits a more claw like grip, this will make your hand rotate to a more neutral position => opposite of apple mouse, that's horrible 2. Self-massage 3. Stretching (try and find the angle where it hurts) 3.0 Steps (I think for starters twice a day will yield results, you will figure out for yourself if you need more or less) 3.1 Warm-up your forearm (movement with no pain) 3.2 Light stretch (some pain is allowed) 3.3 Gain mobility / Hard Stretch 3.4 Don't go crazy on it, after several minutes you shouldn't feel more acute pain than before 4+ There are some more techniques but the forearm being such a small muscle group they wouldn't help too much General muscle pain 1. Eat enough proteins 2. Try and not underdo too much the basics - Hydration - Sleep - Some vegetables in the diet Great vids btw
@zrajm
@zrajm 6 лет назад
On the subject of arm pain: Place the mouse on the left hand side of the keyboard - this works by 1) spreading the workload between the hands (only slightly, if you're a terminal-minded person like me, but still) and 2) decreasing the distance you move your hand to reach the mouse (since normal keyboards are asymmetrical and stick out further to your right - with arrow keys, and numerical part). Also, make sure you arms are supported by your desk (don't hold them up by muscle force), and that your wrists are not bent (usually this entails putting your keyboard flat on the desktop surface and not folding out those small legs most keyboards have).
@VictorMorettiOfficial
@VictorMorettiOfficial 7 лет назад
Man, I am currently on 7:08 and have learned more than with hundreds of articles on the web. Thank you very much, seriously. JS looks crazy for square guys like me haha
@Gjacolby83
@Gjacolby83 8 лет назад
Nice video! That was a great little explanation on those concepts. I now credit you with convincing me to start using let until I am wise enough to know when to use const.
@SystemCTRL
@SystemCTRL 8 лет назад
Hand / arm issues related to long hours smashing your keyboard can be relived with the help of stretches and tender loving care. 1. Stretch and do it often. Extend your arm straight out in front of you. Palm facing away from your chest and fingers pointed away from your feet. Take your other hand and apply pressure to your fingers so they are bend back toward your wrist. You can also reverse this by bending your hand and fingers downward. Do not over extend, listen to your body. 2. Place hand / arm in warm water for 3 -5 minutes. After massage the muscles with you opposite hand. 3. Take any anti inflammatory drug. (aspirin, ibuprofen) Not recommended for constant use. Haha get it, constant?... 4. Take time away from your computer and change your working set-up. I personally use thumb controlled mouses. The ones with the ball and all you do is move your thumb to move the mouse cursor around.. anyone else use em? Helps wonders.
@Neppord
@Neppord 8 лет назад
fantastic state rant!
@funfunfunction
@funfunfunction 8 лет назад
Thanks!
@BenjaminMJ
@BenjaminMJ 5 лет назад
const notes = { video: { ref: "Variable Types", src: "ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-sjyJBL5fkp8.html", v: "Javascript ECM5 - check differenced to current ECM version (6)", content: { Scopes: { block: "if, for, etc", function: "within the function", global: "whole file [NEED TO CHECK]", exported: "entire project [NEED TO CHECK]" }, "variable types' scopes": { "no type": "automatically declared as global variable", var: "function scope", let: "block scope", "const": "block scope" }, hoisted: "variabls are 'hoisted' in JS. Declarations are automatically moved to the top of their respective scopes.", "use strict": "prevents undeclared variables to be promoted to global scope. Always use 'use scrict'", "mutable states": "VERY important to minimize this as this can be the source of applications stalling/hanging. Minimize it by using 'const' variable type every time you dont specifically need a type:let variable. If you dont need to redeclare it, use const. Important." } } }
@ChrisRuzin
@ChrisRuzin 8 лет назад
I was also having arm pain a couple years back, and what greatly helped me was learning to use a Kinesis Advantage keyboard along with a trackball mouse. The Advantage has the keys in a columnar layout and shaped like a bowl so your fingers don't have to travel as much. It took me a good week before I felt comfortable using it but now I can't stand any keyboard that isn't columnar.
@clarenceworley5125
@clarenceworley5125 7 лет назад
I enjoy your teaching style.. added you to my short list of go to youtube teachers.
@K4TaY
@K4TaY 4 месяца назад
For your arm pain....get a yo-yo and make sure you use it properly by holding the yo-yo in your palm and throwing the yoyo down by facing your palm to the sky and rolling the yoyo out of your hand by extending and stretching your wrist backwards and rolling the yoyo off the end of your fingers. 15 years ago I thought I was being trolled by asking a reddit thread how to cure Carpal tunnel syndrome and was told by a russian programmer to get a yoyo. Once I learned the proper way to throw the yoyo, the pain subsided in 1 week after a doctor had just told me I would need surgery. I carry a yoyo with me in my backpack to this day and have never had the pain issues again!
@justinr4650
@justinr4650 6 лет назад
Very well explained MPJ, you are the man!!
@ManuelPenaloza
@ManuelPenaloza 8 лет назад
I've been waiting for an explanation of this just like your's. Thank you!
@zackthoutt8457
@zackthoutt8457 7 лет назад
I had the same arm pains along with something akin to tennis elbow. I got a vertical mouse and had to do a series of weekly massages before everything went back to normal. I now stretch my arm muscles several times per day and try to exercise them in other ways to keep them feeling fresh.
@lamecfletez7598
@lamecfletez7598 7 лет назад
I had carpal tunnel surgery in January. Your symptoms sound very similar to mine. I had arm pain, wrist and hand pain, numbness and loss of strength. You should visit an orthopedic surgeon. They have tests that can verify if it's carpal tunnel syndrome. Recovery wasn't fun but definitely worth it.
@agasarang
@agasarang 7 лет назад
Just found your videos. Are you still having arm pains? I was thiiiiis close to surgery before going all ergonomic setup. This included a ten-keyless keyboard (Kinesis Advantage 2 -- best keyboard I've ever owned), trackball, a keypad on the left side (Razer Orbweaver for shortcuts), etc. This COMPLETELY eliminated all arm pains, shooting electric shots up through the shoulder and spine, etc. Saved me tens of thousands in medical fees. Really enjoying the vids -- subscribed!
@gabrielbalsa1843
@gabrielbalsa1843 7 лет назад
Excellent videos! I followed you on twitter first where I knew about FunFunFunction and I'm McLoving it! Keep it up!
@josemarin359
@josemarin359 6 лет назад
Thanks a lot for your great effort. It is really fun to watch. I love the role plays with different characters to see all the different angles. I have noticed the way you express your self with words that stress the reserve words you are explaining. It sparks my neurons and keep me focus. Interestingly I have watched a lot of your videos about the most complex subjects and such a basic thing as the proper use of const will increase the robutness of my code. I have been leaking so much unnecessary state in my code!!!! So I will go to basic.
@mattharris2058
@mattharris2058 8 лет назад
First, great video. Second, wrist pain. I don't get wrist pain for the same reason, but I think I have a solution. I tore my left TFCC (cartilage in the wrist). Ever since, I've had problems with pain. I bought a Goldtouch V2 Adjustable Keyboard and it literally solved all my issues. It looks incredibly weird (I've never met anyone that hasn't commented on it) and takes some getting used to, but it feels incredible. My first one lasted about 6 years (I think it broke in a box while moving, so I don't think it even gave out), and I just bought my second one a few months ago. I honestly swear by it. Writing this makes me think I should write a review lol.
@vladanng
@vladanng 7 лет назад
When he is making video 20 minutes length, you know you will watch it for one hour, not because of looking to understand problems and various situations, , but looking his facial expresions, movement, voices and shouts and constantly repeting them. Yes.
@doaashafik3073
@doaashafik3073 5 лет назад
any video I see in this channel is very useful thank you 💖
@kpihus2
@kpihus2 8 лет назад
About pain in your primary arm, use trackball. With trackball, you basically have to move only your thumb, thus helps a lot. Logitech M540 is my personal favorite.
@Qbe_Root
@Qbe_Root 7 лет назад
6:42 You’ll also have issues with lines starting with a bracket (e.g. an array destructuring assignment), a unary plus/minus operator (e.g. an expression that needs to be converted to a number but not stored for some reason?), though clearly the IIFE is the most common case. Basically, when you start a new line with a character that could also be part of the previous statement, start it with a semicolon instead because the JS engine will assume that you’re just breaking a single statement into several lines unless that really doesn’t make any sense. Also, here’s a pretty effective way to get your team to hate you: a ++ b
@charmainetabilas3132
@charmainetabilas3132 5 лет назад
I'm super late but if you are still feeling pain in your hands/arms from coding/typing all day, try to keep your wrist at an angle below your elbows. Also try to stretch out your wrist and shoulders occasionally. Also take some time to do stretches that bring your shoulders back and traps down. (i.e. grab your hands together on your low back and pull them back). Simple but effective. These videos are so helpful and great though so thank you so much!
@kaosmentalgeral
@kaosmentalgeral 7 лет назад
I also have problems with this type of pain. What I started doing is switching the mouse hand from time to time. At first it is REALLY hard to use it with the other hand (but I had no choice, was finnishing my masters and had to keep writting my dissertation and coding). But nowadays I can use both hands with the same speed. I also noticed that puting my chair higher helped. Good luck!
@SteveSchmechel
@SteveSchmechel 8 лет назад
From where you are pointing, it could be ulnar nerve entrapment - not a doctor but I have dealt with that before. Initial cause is slouching posture for long hours that happens as you get tired. To get rid of it, plan on doing some massage and some back-strengthening exercises for quite some time. I highly recommend this book "It's Not Carpal Tunnel Syndrome! - RSI Theory and Therapy for Computer Professionals" by Suparna Damany and Jack Bellis.
@Loige_com
@Loige_com 8 лет назад
finally a very in depth clarification of the differences between var, let and const! kudos for mentioning that const doesn't make object immutable, which at first is very counterintuitive. now you should do one about Object.freeze and deep-freeze 😋
@petrabuys2372
@petrabuys2372 7 лет назад
you are the most fun teacher ever !! thank you
@pudd1ncat
@pudd1ncat 6 лет назад
Just found your channel, you are such a great teacher. thank you for all your time!!!
@sweeball
@sweeball 7 лет назад
I am not a doctor, but I suspect that your hand/arm pain is most probably Repetitive Strain Injury (RSI). I think that it might be helpful when you get it in, say, your right hand/arm to try to use your left hand to operate your mouse, etc. You need to be able to rest your affected limb. Thanks mpj for the vids on "becoming a better programmer" FunFunFunctions is the best I've found for a wide variety of programming topics (... and the most entertaining). Keep up the good work. I always look forward to Monday mornings at 08:00 GMT for my next "fix".
@ThePolaris87
@ThePolaris87 7 лет назад
Thank you for clarifying this. You have gotten yourself a subscriber!
@satishramjee
@satishramjee 5 лет назад
I had a similar problem with meta tarsals. Changed the mouse to use a trackball or a very small mouse and that helped so much that the pain went away.
@joshuaesmero1464
@joshuaesmero1464 7 лет назад
best explanation I've found so far on this.
@zhenwang4108
@zhenwang4108 7 лет назад
I was giving up on coding, but after I saw this, I think it might be just because of lack inner motivation... Thanks!
@simonprickett
@simonprickett 7 лет назад
Hand pain idea... I have found the old school Microsoft Natural Keyboards to be fantastic, and I own several now. Takes some time to adjust typing style, but has helped me a lot and acts as good security as nobody else will want to use your workstation as it will ruin their typing speed.
@TheNzdavis
@TheNzdavis 6 лет назад
I love the way you present your lectures. I'm like playing super mario on my switch at the same time learning. :D
@robsmith1184
@robsmith1184 8 лет назад
I find having an active lifestyle outside of work, lifting weights, swimming, climbing leave me with no pain from being at a desk all day.
@longtran12345678
@longtran12345678 8 лет назад
thanks a lot, very clear and fun to learn with your video every Monday
@TheMrChugger
@TheMrChugger 8 лет назад
Glad to know I was using this correctly! Also great explanation of some of the internal JS scope behaviours. Crazy little language.
@2bitornot2bit73
@2bitornot2bit73 6 лет назад
I started using apple's magic mouse and it helped me a lot, it's height form factor did the trick for me
@xcgalicia
@xcgalicia 6 лет назад
I used to have problems with the pain and nasty sensation in my hands. I fixed that with YOGA. I discovered that everything is connected, so if you're feeling problems in your hands, you don't just need to exercise and stretch your hands but also your arms, and your neck, and your back, and your spine and your legs, and the reason for this is that everything in the body is connected so Yoga its a good remedy since it makes you stretch and excercise everything! Ive been doing Yoga for years, however not so disciplined, until i realize that it would help me with my hands problem so i had to start doing it at least three times a week and that definitely has cured me. If you're not into Yoga I'm sure you can try with Tai Chi or Kung Fu which are in the end very similar. Hope this helps others as much as it has helped me.
@josemaenzo
@josemaenzo 8 лет назад
Great as usual. It would be nice if one episode is about immutability, with real life examples of how bad is mutate objects.
@richardtapan3950
@richardtapan3950 6 лет назад
Man I was reading a book about es6 and it was sooooo boring I almost fell asleep without actually learning, but when I watched this, I feel like Im learning alot more in less time. Thanks man, huge help!
@NurseDaveBSMSON
@NurseDaveBSMSON 8 лет назад
just wanted you to know you're a hit at our bootcamp.
@treestompz
@treestompz 7 лет назад
Awesome video! You keep my full attention throughout all your videos with your energy and humor :)
@anuragkothare6181
@anuragkothare6181 6 лет назад
So nicely explained. Good presentation. Loved it.
@ramiahviknesh3014
@ramiahviknesh3014 6 лет назад
Great video on Let,Const and Var
@pleabargain
@pleabargain 7 лет назад
1:30 nice use of the cursor highlight/ focus! Your production qualities continue to improve!
@CarloRizzante
@CarloRizzante 7 лет назад
Kyle Simpson has written a neat explanation about how hoisting actually works (compilation vs execution) in his series of books "You Don't Know JS". Those books are an absolute must read for anyone who works in JS, even seasoned programmers can benefit from it. For the record, he has as well excellent arguments for the use of semicolons where the JS engine would put them. My argument is that ultimately semicolons communicate your intentions just like "const" do. Said that, thanks for your endless stream of video. It's really nice to see so much love for JS. I love it too :)
@willsi
@willsi 8 лет назад
MPJ! My recommendation is lift weights. You don't have to lift for Strongman or join a gym, however activity will get blood-flow where needed and assist recovery in minor injuries. Stretching, swimming, moving the body in general helps. Love the video!
@DecaSpace
@DecaSpace 7 лет назад
For pain, search on RU-vid for the video: Wrist Exercises for Tendinitis Carpal Tunnel Syndrome - Avoid RSI injury in just 2 minutes a day! Also do myofascial release using a lacrosse ball on your hands and forearms, video: Forearm Pain | Active Self Myofascial Release Icing helps a lot and taking frequent breaks. Drinking plenty of water makes a huge difference too :)
@autochton
@autochton 8 лет назад
If you type a lot, consider a wrist brace (handledsstöd). My wife uses these (she's an author), and they help a lot. She prefers the type with a metal support bar, you may find those are too stiff, but braces are available without.
@cesalberca
@cesalberca 8 лет назад
I had the same problem Mattias! I just started swimming. The thing is some kind of pains on the wrists and the arms come from a bad sitting posture.
@srivastav_prince07
@srivastav_prince07 6 лет назад
Great explanation ! finally got my doubt cleared after watching this video , Thanks a lot.
@sesho777
@sesho777 4 года назад
you're the best teacher ever!
@ChuckLeone
@ChuckLeone 7 лет назад
I switched from a mouse to a Wacom tablet and my right wrist pain stopped pretty much immediately. Took about 2 weeks to get fully comfortable with a stylus and haven't used a mouse in 10 years. I'm now using Surface Studio and Surface Pros for all development and design work.
@Newportcouncilcyngorcasnewydd
@Newportcouncilcyngorcasnewydd 7 лет назад
Hi Chuck, Interesting that you swapped that way as I did exactly the opposite back in 2003 as my tablet caused pains in my wrist until I added a gel pad for support. I'm not a designer though, so I have much more keyboard use and a decent sloped/padded one works for me. Something I've recently found is my tendons tighten up which is a whole different set of pain than the pins and needles. An over-tight watch strap is something to look out for! MPJ - thanks for a very entertaining and educational style. Learning plenty from your videos even though I'm an old dog ;-)
@AvindraGoolcharan
@AvindraGoolcharan 8 лет назад
Not sure if you already know this one but CTRL + L does "clear" for you (works in any libreadline powered shells IIRC). So node and bash are covered. For your hands, try rock climbing. You'll exercise them in new ways and toughen them up.
@ahwaliazizi
@ahwaliazizi 6 лет назад
loved the dish washer example!
@Headifen
@Headifen 7 лет назад
Thanks man, fun video! I wish I found this 6 months ago when I was banging my head against the wall on this stuff!!! Love the format and I learned a few things :).
@justinr4650
@justinr4650 6 лет назад
Dude you are just awesome!!!! i love your videos, they are clear and make learning fun!! please keep them up!!
@mcalavera81
@mcalavera81 8 лет назад
Recommendations for hand pain/injuries: 1. Using trackballs. 2. Learn to use both hands 3. Stretch arm and neck muscles. 4. Taking breaks.
@dexdevlon8941
@dexdevlon8941 5 лет назад
Extremely useful lesson
@PiotrZientara
@PiotrZientara 6 лет назад
I had some pain in my arm too. I almost couldn't use the keyboard and it hurt me for longer than 3 months. There was a video on carpal tunnel syndrome yoga, with a 1 hour session which totally recovered me form this problem. Unfortunately this particular video is not on RU-vid anymore but there are a lot of yoga sessions you can find and test.
@keithwins
@keithwins 8 лет назад
for your arm pain -- the Microsoft comfort sculpt keyboard is awesome. best ergonomic ever, and I've tried a lot. make sure you get the sculpt comfort, there are a few sculpt models. it's the cool looking one too...
@gtg502x
@gtg502x 7 лет назад
Hi, the pain you are experiencing is likely due to Carpal Tunnel Syndrome. The bones in your wrist are called carpal bones. The bones are arranged in a circle, which makes up your wrist, and this circle has a hole in the middle, which forms the tunnel. This is similar to a doughnut. The tunnel has tendons and a nerve running inside of it. When you overwork your fingers, the tendons in the tunnel become inflamed, as you mentioned. When the tendons become inflamed, they get bigger. However, the tunnel is fixed in size and cannot expand. This causes a lot of pressure to build up inside the tunnel. The nerve in the tunnel ends up getting compressed and damaged, which causes the pain in your wrist and fingers. This is called Carpal Tunnel Syndrome. The way to avoid this is to put as little strain on your fingers as possible. I am a doctor who writes a lot of code, and I had carpel tunnel syndrome in the past. I was able to fix it by buying a keyboard with keys that have a low click force. I am currently using a mechanical keyboard with Cherry MX red switches that has an actuation force of 45g. I also replaced my mouse with one that has low click force buttons. Basically, if any buttons or keys are hard to press down, get rid of it. Thank you for the great video.
Далее
JavaScript var, let, and const explained
11:56
Просмотров 23 тыс.
Коротко о моей жизни:
01:00
Просмотров 389 тыс.
The Most Legendary Programmers Of All Time
11:49
Просмотров 551 тыс.
Differences Between Var, Let, and Const
8:37
Просмотров 187 тыс.
Prototypes in JavaScript - FunFunFunction #16
11:56
Просмотров 123 тыс.
Composition over Inheritance
8:34
Просмотров 511 тыс.
Understanding Immutability in JavaScript
9:41
Просмотров 4,8 тыс.
S23 ultra screen 💥 #Fixit
1:01
Просмотров 4,4 млн