1. trikitrok
  2. RefactoringMovingExercise

Commits

trikitrok  committed 52539ba Draft

Better name for constant, I think...

  • Participants
  • Parent commits f975c77
  • Branches default

Comments (0)

Files changed (1)

File src/ExtractClass.js

View file
  • Ignore whitespace
 function DNI(characters) {
 
 	this.validate = function(characters) {
-	  var BAD_DNI = 'bad DNI';
+	  var BAD_DNI_MESSAGE = 'bad DNI';
 	  var nifCharacter = characters[characters.length - 1];
 		if (nifCharacter !== 'a') {
-		  throw BAD_DNI;
+		  throw BAD_DNI_MESSAGE;
 		}
 	};