javascript

Typed JavaScript and CS559

in Pages

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…

Object Oriented Programming in JavaScript, Part 2

in Tutorials
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. In the first part of this tutorial (Traditional Object Oriented Programming in JavaScript), 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…

Traditional Object Oriented Programming in JavaScript

in Tutorials
This tutorial was written for CS559 2020 by the course staff, and updated for 2021. JavaScript has many different mechanisms for doing object oriented programming. Many of them are hard to learn. They are very general, but require effort to implement common idioms (like classes). 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. Read more…