What do you wish to know about JavaScript when you were in university?

twitter logo github logo ・1 min read

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! 😁

twitter logo DISCUSS (37)
markdown guide
 

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.

 

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??

 

we have 'jquery' in our university and that chapter is almost as long as javascript itself.

 

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?

You can tell them about the local javascript communities, conferences, and meetups
This is really great point! Thank you! :D

 

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 but fetch 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.

Like you can show them how difficult it was to do xmlHttpRequest but fetch just made things easier.

That's really great thing to do :D Thank you :D

 

Hmmm, I'd say stuff like.

  1. String + number = concatenated number or string

    • '5' + 5 = 55
    • '5a' + 5 = '5a5'
  2. String - number = number or NaN

    • '5' - 5 = 0
    • '5a' - 5 = 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.

 

yup! Great idea for some tricky examples and exercises! :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 to const and let.

 

TypeScript is worth to mention! And var vs const and let. True! Thanks! :)

 

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

 

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 wish I'd known that JS is so ubiquitous that I'd need to know it no matter what. I mean, I didn't do a CS or IT related course at Uni - I did a Humanities course, but I ended up working as a developer anyway since I did a website as a final year project (my degree was media-related, so there's the overlap), and ended up designing databases as an admin assistant in my first job out of uni. I've had numerous times when I've had to fix this or that within a JavaScript file, but never had much in the way of formal training.

So, what I'd say is, if you're at uni & there's a module in JavaScript that you can pick up & have it count at all towards your degree, go for it. You are probably going to need it, if you do anything IT related in your job.

 

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

 

"What do you wish to know about JavaScript when you were in university?"

Who was writing the language so I could contact them to make a better language.

"Especially these days, any program should teach JavaScript because of its ubiquity."

Only to get a job.
Programming should be taught in a good language to teach proper methods.
Only then you show them JavaScript.

 

Learning JavaScript, there where some things that took a while to understand:

  • re-assigning versus copying over an array or object
  • scope
  • what is 'this'
  • not doing everything with a for-loop (in other words, use array methods like .map())

Back in uni, I would've been impressed with just a little DOM manipulation though!

 

I wish I knew how scope works in Javascript, I would avoid a lot of bugs! :)

 
 

Just use let and const to stay away from that weirdness :D

 

I did Bunch of JavaScript at University. Although all things JavaScript have moved on significantly since then.

 

I wish I would know the power of Javascript to learn ASAP. In my university, there 's no official lecture for Javascript

 

I didn't study coding at the University so I wish I knew some JavaScript then 😂
Man I would be far! 😂

 
 

I think the study on Data Structure and Algorithms is very important, because it is possible to improve the logic, as well as know more about the language (in this case, Javascript).

 

I would steal the outline of this Syntax FM episode to use as a guide:
syntax.fm/show/162/the-fundamental...

Classic DEV Post from Sep 13

Follow Friday: Which DEVs would you recommend following?

Follow Friday: Which DEVs would you recommend following?

Natalia profile image
Frontend developer and CSS maniac. Awkward Shiba lover.

dev.to now has dark theme. 🌝

Go to the "misc" section of your settings and select night theme

P.S. It's also the best place to talk code amongst thoughtful developers, and it's totally open source.