Various Tutorials About JavaScript topics for CS559

Included is a a two part tutorial on doing Traditional Object-Oriented Programming in JavaScript, and some other thing useful for class.

Typed JavaScript and CS559

in Various Tutorials About JavaScript topics for CS559

JavaScript does not require you to declare the types of your variables, function arguments, objects, object properties, or much of anything. However, if you give it some hints as to what you expect (as comments in your code), you can help a reader understand your program, and software tools find mistakes.

This page describes some programming practices that are recommended for CS559.

Read more…

Traditional Object Oriented Programming in JavaScript (Part 1)

in Various Tutorials About JavaScript topics for CS559
This tutorial was written for CS559 2020 by the course staff, and updated for 2021 and 2022. Originally, JavaScript had some non-standard ways to do object-oriented programming. They were very cool, and very flexible - but they were non-standard and hard to learn Fortunately, newer versions of JavaScript (like we use in class) give us another option that provides a convenient syntax for “traditional” (class/instance style) object oriented programming. JavaScript ES6 introduced classes to JavaScript, which use notation similar to what you may have seen in other object oriented languages. Read more…

Traditional Object Oriented Programming in JavaScript (Part 2)

in Various Tutorials About JavaScript topics for CS559
This is part 2 of our 2 part tutorial on “Traditional” Object Oriented programming in JavaScript. The tutorial was written by the course staff in 2020, but updated in 2021 and 2022. In the first part of this tutorial (Traditional Object Oriented Programming in JavaScript (Part 1)), we showed you how to use JavaScript’s class syntax; this time, we’ll take a look at how we can use it to do the things you’re used to in object oriented programming: inheritance, polymorphism, and more. Read more…