DOC

In this example below you will see how to do a DOC with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by 0degreesk, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright 0degreesk ©
  • HTML
  • CSS
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>DOC</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div id="decks">
  <div id="playing-board"></div>
</div>
<div class="controls">
  <button id="new-game">New Game</button>
</div>
  
  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/0degreesk/doc-yEyXEB */
.decks { overflow: hidden; width: 500px; }
.original-deck,
.shuffled-deck { width: 50%; float: left; }


/*Downloaded from https://www.codeseek.co/0degreesk/doc-yEyXEB */
class Student {
    constructor(gpa, credits){
        this.gpa = gpa;
        this.credits = credits;
    }

    stringGPA() {
        return this.gpa.toString();
    }
  
  get level() {
    if (this.credits > 90) {
      return 'Senior';
    } else if(this.credits <= 90 && this.credits > 60) {
      return 'Junior';
    } else { 
      return 'Freshman';
    }
  }
}

const student = new Student(3.9, 60);

console.log(student);
console.log(student.level);

Comments