Hey guys!
I was asked if I would like to make a couple of lectures at the university about plain JavaScript (basics). And I would love to but I'm not sure where to start.
So here we are. Some of us are years after school/uni and some of us are still there. What do you wish to know about JavaScript when you were in university? And what would you like to say to students right now?
Any tips, help, ideas or even articles are welcome! 😁
Top comments (51)
That's a big topic! Here are some thoughts:
Java and JavaScript are not the same thing. They aren't even related; the fact that they have the same base name is just a historical trivia fact
You'll see a lot of people criticizing javascript on the internet... most of those criticisms are fixed by ES6; but some are still valid. This is one of the more amazing talks which covers some of the potential hiccups: destroyallsoftware.com/talks/wat
JavaScript can run almost anywhere (browser, server, mobile with react native, IoT with some libraries...) and there are different styles and APIs for each. That can be really confusing to beginners, so I guess the advice is to just know that and watch out for it. It's also one of its super powers! Learn javascript, and you can really do full-stack anything.
JavaScript can be written with classes (more OO) or functions (more functional). That's confusing to beginners, but it's also one of its greatest strengths. Both types are important to learn
Arrays and objects (hashes) are the real meat and potatoes primitive types of data in javascript - learn to love them!
If you get stuck, just google "javascript [problem]" and hopefully you'll get unstuck.
Programming should be fun :) Don't let the warts of a language sour it for you. JavaScript (after ES6) actually is a really good language.
Those are all pretty "high level" thoughts, but hopefully it helps. I've been planning a post about how I love javascript, even though people seem to hate it - and those are most of my points :)
Good luck!
I didn't know that someone may be interested in the history of JavaScript. That's smashing! Thank you! :D
Have you ever seen the DEV policy you can take a problem by reason of the Link
That it existed...
Anything I learned in school was restricted mostly to Java, and I've always had a much better time hacking on webdev stuff.
Especially these days, any program should teach JavaScript because of its ubiquity.
we have 'jquery' in our university and that chapter is almost as long as javascript itself.
If u understand JS and s6 you'll understand jquery in like an hour
I only learned Java at college too. I had only one web dev intro course and that was it.
Ahh I'm highly considering going back to college and this scares me. Just the fact the person above you mentioned Jquery gives me shivers. I know a good bit of C#/.NET but once I discovered Javascript I've used it for almost everything.
Anyway, I quit my job as a web developer to go back to college and start a new degree, that degree of course being Computer Science. I'm doing this because I figured it would lead to me becoming a better developer, but sometimes with all the things I read about college, I'm not so sure...
Input anyone??
Colleges or university won't make u a better developer, you need to learn it your self and really practice hard, universities gives unnecessary work lost but I guess the certificate is important
Hi, I am a university student and here are some of the things that a lot of people in my college don't know about :
a lot of people don't know what ES6 is or in general what javascript versions are and how javascript has changed over the past.
Some of my classmates are too confused about React vs Angular vs Vue and they just try to rank them (XYZ is the best framework etc) so maybe you can tell the advantages and disadvantages of every framework and their use cases.
You can tell them about the local javascript communities, conferences, and meetups and maybe encourage them to join these communities if they are interested in javascript
Also, you can encourage them to join dev.to, GitHub and other websites like this.
Good luck with your talk!
Hmmm, do you think I should talk about the latest changes in JS version or talk about the most interesting changes that happened?
I guess the interesting one's! It's fine if they don't know flatmap or even async await etc but maybe just go for things that they'll understand easily.
Like you can show them how difficult it was to do
xmlHttpRequest
butfetch
just made things easier.Same with prototyping vs es6 classes.
Also, people from my class have no idea what "asynchronous" is so you probably would have to start from explaining how javascript works different from python or other general languages and then if you have time left, you can talk about promises and then maybe give a short intro to async await.
That's really great thing to do :D Thank you :D
Glad it helped! good luck with your talk :D !
Closures. How they work and how to get away with never defining a single class.
Throwing functions around like variables because that's all they are.
Typescript. It exists and it can make the Dev experience so much less frustrating.
What happens to variable scope with
var
as opposed toconst
andlet
.TypeScript is worth to mention! And
var
vsconst
andlet
. True! Thanks! :)Hmmm, I'd say stuff like.
String + number = concatenated number or string
String - number = number or NaN
I've spent some time debugging an issue related to this and only found it a few years ago. Wish they had a class like 'JS - Fun facts'.
Type coercion, if anyone is curious about the topic.
The famous example:
'10' + 1 === '101'
'10' - 1 === 9
:-)
(and the difference between == and === that's also a nice one)
yup! Great idea for some tricky examples and exercises! :D
Hey!
Although I didn't know anything about JavaScript at university - I studied philosophy - I'm now a tutor at a coding bootcamp teaching JavaScript from scratch. Our first module is called JavaScript Basics!
In lectures we cover primitive types (strings, numbers and booleans) advancing to more complex data structures (arrays and objects) and functions, defining what they are, what they're useful for, and a look at some built-in methods with some examples, and the MDN documentation. We cover control flow (loops and if statements) and I like to focus on the array iteration methods (map, filter, reduce etc) particularly as an alternative to loops.
We give a set of exercises where the students clone a repo with a load of jest test cases grouped by data type (strings, numbers etc) and they have to run the tests to write the functions that pass the tests. For example, they have to write a function that makes the first character of a string upper-case. I think this is a nice intro to TDD too, and it's nice to get the validation of the green ticks when they get it right!
Hope that gives you some ideas!
Oh that gives me a lot of awesome ideas! Thank you for such great insight! :D
I think besides the obvious fundamentals (primitives vs objects, conditions, operators, etc.), one thing that wasn't really discussed in my courses was the actual language. Where did it come from? Why was it created? Why is it referred to as an interpreted language? What really goes on behind the scenes? What's a JavaScript engine? All of these I see as fundamentals, but (at least in my course) they were never really touched on.
Once I learned more about these, I found I grasped the language a better. In fact, there's a great article written not too long ago by a fellow DEVer that touches on some of these questions: dev.to/areknawo/javascript-from-th...
Hmmm, that's really good idea for the intro to Js course!
Going to check those questions you recommend! Thanks :3
The main thing I would like to know is how to use my time more effectively when learning a language. In fact, studying at the university only bothers me, so I just order accounting help and other tasks on the site au.edubirdie.com/accounting - it always helps me out and I have more time to study coding.
I would recommend opening up the console and show them js in action. How you play with the dom. Add and remove elements and classes. Try and show that js has a fun side.
That's on point history of javascript ain't a big deal
Uu, that's a nice idea! Thank you :)
When I learned JavaScript in university more than 15 years ago (and the course was not really about JavaScript, but emerging web technologies at that time), it was just taught as a basic scripting lanugage for the web. I really wish I could have learned more about the prototype-based object system, the functional programming style, and its extreme flexibility other than just a basic scripting tool, I'd love to get introduced more to this "free-style" programming style different from the Fortran/Pascal/Basic/C++/Java ways (well, I did learn Lambda Calculus in university, which is different, but not really a practical programming language)
Also personally I like JavaScript as a programming language, well I know it might be one of the most hated (if not THE most hated) programming languages in history, and I like Rust/Python/Scheme/Haskell/Elixir/etc. too, and I have plenty of frustration with JavaScript's run-time "un-errors" and "landmines" myself, but IMHO JavaScript stands out as the most "free-style", non-opinionated and still very practical programming language out there. After many hours of coding works following the "pythonic way" and "Java design patterns", coding in JavaScript can feel like a breeze of fresh air.
That's why I think everyone should at least learn a bit of JavaScript, not just because of its ubiquity nowadays, but also it's one easy-to-learn language where you actually can delve deep into multiple vastly different programming paradigms and learn many different ways of thinking. Where most other popular programming languages nowadays tend to be biased towards a certain philosophy on how to solve certain problems best, JavaScript's philosophy seems to be do whatever you want in whatever way you choose.