AlreadyBored/basic-js

Vigenere Cipher Throwing Error.

Blick7 opened this issue · 1 comments

Hello,
Task Vigenere Cipher has requirement: Functions have 2 parametrs. If at least one of them has not been given, an Error must be thrown.
The problem: My Cipher code can run all the tests without throwing any error:

// test shouldnt pass without that piece of code:
if (!string || !key)
      throw new Error();

My output without previous code:
изображение

Thanks, accepted