about | help | code help+videos | done | prefs |
Given a 5-digit binary number, return the number converted to its decimal equivalent. The binary number is passed as a list of 0's and 1's, beginning with the most significant digit. For example, [0,0,1,0,1] represents binary 00101 (or decimal 5). fiveDigitBinaryToDecimal([1, 1, 1, 1, 1]) → 31 fiveDigitBinaryToDecimal([0, 0, 0, 0, 0]) → 0 fiveDigitBinaryToDecimal([0, 0, 1, 0, 1]) → 5 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 125
Copyright Nick Parlante 2017 - privacy