본문 바로가기
알고리즘/Codewars

[Codewars] Bin to Decimal (8 kyu) / JavaScript

by fluss 2023. 3. 7.

https://www.codewars.com/kata/57a5c31ce298a7e6b7000334

 

Codewars - Achieve mastery through coding practice and developer mentorship

A coding practice website for all programming levels – Join a community of over 3 million developers and improve your coding skills in over 55 programming languages!

www.codewars.com

 

DESCRIPTION:

Complete the function which converts a binary number (given as a string) to a decimal number.

 

코드

function checkForFactor (base, factor) {
  return base % factor === 0;
}
 

댓글