Skip to content

Latest commit

 

History

History
81 lines (52 loc) · 1.12 KB

README.md

File metadata and controls

81 lines (52 loc) · 1.12 KB

Object-Oriented-One

Object Oriented One (OOO) or O³ (may also be known as ozone)

The One class in js, from this meme:

(author unknown, if don't want this img here, contact me)

Usage

Js

// JavaScript

// instance
const oneObj = new One();

// get the value
const one = oneObj.getOne();

// use it!
i = one + i;

// OR use directly
i = new One().getOne() + i;

// extra: setOne(<value>) (value must be 1)
oneObj.setOne(1);

Python

# Python

# instance
oneObj = One()

# get the value
one = oneObj.getOne()

# use it!
i = one + i

# OR use directly
i = One().getOne() + i

# extra: setOne(<value>) (value must be 1)
oneObj.setOne(1)

C++

// C++

int main(){
	  // instance
	  One oneObj = One();

	  // get the value
	  int one = oneObj.getOne();

	  // use it!
	  int i = one + i;

	  // OR use directly
	  int i = One().getOne() + i;

	  // extra: setOne(<value>) (value must be 1)
	  oneObj.setOne(1);

	  return oneObj.getOne();
}

LICENSE: MIT