Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oop - WHAT MANIAC WROTE THIS PACKAGE #6

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

oop - WHAT MANIAC WROTE THIS PACKAGE #6

wants to merge 1 commit into from

Conversation

knokbak
Copy link

@knokbak knokbak commented Jun 15, 2021

I- I have removed around 6k lines. You're welcome.

I- I have removed around 6k lines. You're welcome.
@knokbak
Copy link
Author

knokbak commented Jun 15, 2021

btw here's a script to make the file even longer:

console.log(start());

function start () {
  let string = "function isEven(n){\n  switch(n){";
  let count = 25000;
  for (let i = 0;i <= count;i++) {
    string += "\n    case " + i + ":\n";
    if (isEven(i)) {
      string += "\n      return true;";
      string += "\n      break;";
    } else {
      string += "\n      return false;";
      string += "\n      break;";
    }
  }
  return string += "\n  }\n}\nmodule.exports.isEven = isEven;";
}

function isEven (n) {
  if (typeof(n) !== "number") return null;
  n = n.toString();
  return ["0", "2", "4", "6", "8"].some(i => n.endsWith(i));
}

@knokbak
Copy link
Author

knokbak commented Jun 15, 2021

set count to whatever number ya want ;)

@knokbak knokbak marked this pull request as draft June 15, 2021 21:18
@knokbak knokbak changed the title WHAT MANIAC WROTE THIS PACKAGE oop - WHAT MANIAC WROTE THIS PACKAGE Jun 15, 2021
@dr-hextanium
Copy link

not writing it by hand? cringe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants