Skip to content

mate-academy/qa_if-else-function

Repository files navigation

QA ifElse function (uk, ru)

Write tests for ifElse function that takes 3 callbacks condition, first and second and runs condition with no arguments. If condition returns true run a first callback otherwise run second with no arguments. No result is expected from isElse function.

ifElse(
  () => Math.random() > 0.5,
  () => console.log(1),
  () => console.log(2),
); // 1 is printed if random value > 0.5

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors