Skip to content

Instantly share code, notes, and snippets.

View poozipotti's full-sized avatar

George Beckert poozipotti

View GitHub Profile
@poozipotti
poozipotti / singletonCounter.js
Created February 7, 2024 17:35
example of using static classes for singleton
class Counter {
static instance;
static get count() {
if (!Counter.instance) {
Counter.instance = { count: 0 };
}
return Counter.instance?.count;
}
static set count(newCount) {
@poozipotti
poozipotti / assignment3.md
Last active January 19, 2021 23:01
assignments for nataly

Class Assignment 3: Conditionals Practice!

Make sure to nest your JQuery library into the tag.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>

For each of the test questions, use conditionals to check whether the correct answer was provided by the user. The click handlers for each question have been provided for you (except for the last question). Go through each question, and do the following:

  1. English : Write an if/else conditional statement to check if the value of the variable englishInput is correct (the answer should be Mon).