Skip to content

anaclaramtn/Beecrowd-Beginners-Problems-Solutions-With-JavaScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 

Repository files navigation

Typing SVG

💡 A small reminder that this repository is intended to solve problems for beginners, that is, to develop programming logic, with resolutions in the simplest and most didactic way possible.

class Beecrowd {
  constructor() {
    this.language = "JavaScript";
    this.solved = 100;
    this.total = 334;
  }

  get percentage() {
    return ((this.solved / this.total) * 100).toFixed(0) + "%";
  }

  logData() {
    console.log({
      language: this.language,
      solved: this.solved,
      total: this.total,
      percentage: this.percentage
    });
  }
}

const progress = new Beecrowd();
progress.logData();
// { language: 'JavaScript', solved: 100, total: 334, percentage: '30%' }