Track JavaScript (Legacy)
JavaScript (Legacy) track

Trinary

An exercise from the JavaScript (Legacy) track
medium

About this exercise

Convert a trinary number, represented as a string (e.g. '102012'), to its decimal equivalent using first principles.

control flow conditionals
control flow loops
integers
mathematics
regular expressions
strings
View all solutions