Skip to main content

All Questions

4 votes
2 answers
288 views

Javascript Object Oriented Planner App

I am creating a planner/scheduling app using objects. I am just a beginner with object oriented programming, so any tips on how to better structure my classes would be very helpful. Program Basics ...
Morrison Bower's user avatar
1 vote
1 answer
609 views

TypeScript fetch wrapper class with localStorage cache

I'm learning TypeScript while doing my portfolio, and I wrote a class to make a fetch request to the API that holds my data. It is working fine. I use localStorage to set a cache to avoid calling the ...
MauricioRobayo's user avatar
2 votes
2 answers
79 views

How can I simplify this JQuery validation process?

How can I simplify this functioning JQuery validation process: ...
John Beasley's user avatar
1 vote
1 answer
169 views

Throwing error if settings / arguments are undefined is this a good breakout function?

...
ThomasReggi's user avatar
16 votes
1 answer
4k views

Should I put default values of attributes on the prototype to save space?

Suppose I've got a JavaScript function that I'm treating like a class - that is, I want to make many instances of it: ...
Simon Sarris's user avatar
2 votes
1 answer
138 views

Is this a good JavaScript class?

I'm trying to get my head around object oriented programming, and I'm starting in JavaScript. I have put a working demo of my code on JSFiddle (here), but the class is below. My main concerns are ...
Grezzo's user avatar
  • 123
5 votes
2 answers
296 views

Javascript inheritance

I have a simple class inheritance in JS: ...
Matteo Pagliazzi's user avatar
3 votes
1 answer
201 views

Implementation of Javascript Classes and Inheritance

I've created a simple Javascript library to be able to create "classes" and extend them defining instance and static methods and variables. It consists in a simple function Class with two methods: ...
Matteo Pagliazzi's user avatar
3 votes
1 answer
444 views

"Class" design in javascript

I'm a systems programmer teaching myself javascript. Prototypal inheritance is completely new to me, so I could use some best practices advice here. I made a simple game (breakout) for my first ...
Ed Swangren's user avatar