Skip to content

vanhapham91/frontend-assessment

 
 

Repository files navigation

APPLICATION DESCRIPTION

Frontend framework: VueJS Use Vue-Cli to serve a local environment Libraries used: Bootstrap 4.6, Vue Router 3.5.1

INSTRUCTION

To switch between exercises, please use the navigation on the top left of the screen.

ANSWER THE QUESTION

  • 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”.

About

MindArc Frontend Assessment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 88.8%
  • JavaScript 6.5%
  • CSS 4.7%