Frontend framework: VueJS Use Vue-Cli to serve a local environment Libraries used: Bootstrap 4.6, Vue Router 3.5.1
To switch between exercises, please use the navigation on the top left of the screen.
- First, it has to evaluate ('b' + 'a' + + 'a' + 'a') to know if it’s possible to call the method toLowerCase();
- Because plus is left-associative, therefore we got “ba” as the result of the first addition.
- In the second addition, the second plus sign is not an addition. It’s a unary plus. Therefore, “ + a” will be evaluated to “NaN”.
- NaN becomes string because it was combined to a string (the result “ba” we have previously).
- After that, we continue as normal to get the result “banana”.