scrimba
Clean Code
What is a good comment?
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

AboutCommentsNotes
What is a good comment?
Expand for more info
index.js
run
preview
console
/*
* This uses ROS Library 1.x.x and Scrimba assumes all risks in doing so.
* This comment is mandated by the license to use ROS Library 2020.
*/

const dataRegex = /^(((0[1-9]|[12][0-9]|3[01])([/])(0[13578]|10|12)([/])(\d{4}))|(([0][1-9]|[12][0-9]|30)([/])(0[469]|11)([/])(\d{4}))|((0[1-9]|1[0-9]|2[0-8])([/])(02)([/])(\d{4}))|((29)(\/)(02)([/])([02468][048]00))|((29)([/])(02)([/])([13579][26]00))|((29)([/])(02)([/])([0-9][0-9][0][48]))|((29)([/])(02)([/])([0-9][0-9][2468][048]))|((29)([/])(02)([/])([0-9][0-9][13579][26])))$/;

function isCorrectId(str) {
const correctPassword = '123456789';

return str.trim() === correctPassword;
}
Console
/index.html
-3:04