Coding Tips 1
Sometimes you need to convert something like a Choice Value List into a specific integer for a calculation.
For this, I am using a function for such scenarios.
Below you can see an example:
๐ง๐ถ๐ฏ๐ค๐ต๐ช๐ฐ๐ฏ ๐ค๐ฐ๐ฏ๐ท๐ฆ๐ณ๐ต๐๐ต๐ณ๐ช๐ฏ๐จ๐๐ฐ๐๐ฏ๐ต๐ฆ๐จ๐ฆ๐ณ(๐ช๐ฏ๐ฑ๐ถ๐ต) {
๐ท๐ข๐ณ ๐ค๐ฉ๐ฐ๐ช๐ค๐ฆ๐ด = {
โ๐ญ๐ฐ๐ธโ : 1,
โ๐ฎ๐ฆ๐ฅ๐ช๐ถ๐ฎโ : 2,
โ๐ฉ๐ช๐จ๐ฉโ : 3,
โโ : โโ
};
๐ณ๐ฆ๐ต๐ถ๐ณ๐ฏ ๐ค๐ฉ๐ฐ๐ช๐ค๐ฆ๐ด[๐ช๐ฏ๐ฑ๐ถ๐ต];
}