JavaScript mainly used for example in this quiz

JavaScript makes it possible to create
and apply responsive behavior to webpages and applications in general, but its
usage does not stop there: the usage of JavaScript allows to create programs
such as games and other interesting applications by the user. As said, the
usage of this particular coding language can be implemented in a multiple number
of circumstances, out of which three will now be briefly explained as examples:
the first usage scenario is connected to storing information regarding a
particular variable, a feature mainly used for example in this quiz assignment,
since it gives the possibility to store how many correct questions have been
answered to then later be displayed at the end of the quiz to know which score
a particular user got. The big advantage that JavaScript gives in this usage
situation is that it helps the user reducing the amount of HTML needed in the
index and allows the user to store all the important elements (such as answers,
options and questions) directly in the JavaScript file, in this way the whole
code gets simplified and it’s then possible applying to this elements other
important features, such as the possibility to display questions in a random
order and such. Another good usage situation can be imagined when creating
objects in the code to more easily access and store information regarding the
various elements which will take part of the object itself. As an example, when
developing a website for tourism purposes, such as booking hotels and fights,
all the various elements related to a hotel booking fees ( room, valet parking,
pool access, gym access, room service, laundry access and so on) can be stored
in one or more objects, and then all the properties can be inserted in those
object (for example premium features, standard features..), to keep the code
simple and organized and to better retrieve these elements later on when you
have to display them, for example at checkout. For the last usage situation it
is possible to use a coding language such as JavaScript to creating a function
to display, as an example, differentiated greeting messages based on what time
of the day it is, or displaying differentiated messages based on the score one
user got in a test or such. These are just three examples but the
implementation of this coding language can be way more variated and could be
implemented in many other different scenarios and circumstances.

Throughout the development process
the main problem that I faced was implementing the welcome page to my code: I
couldn’t manage to connect what was being done by the function to the functions
to any ID’s that I would give to my element ,which was supposed to be the
welcoming message to the users. I managed to overcome this problem thanks to
our course instructor, who suggested to change the  overall set-up of the code which was related
to what I was trying to achieve. By changing the name of the id into a class
element and using the “toggle” function to show or hide the class, I managed to
link this mechanic to the button, which now allows show the test after having
shown a greeting message to the new user. Another problem that I faced at the
beginning was the process of showing how many correct answers a user got after
finalizing the quiz, but luckily that problem was solved , thanks to some
discussing and researching online with classmates in similar situations. The solution
to my problem was that one of my values to the functions was not correct, and that
little detail was enough to impede the correct functioning of the whole application.
Thanks to some debugging the mistake was found and successfully corrected.

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

With the newly acquired knowledge
from this programming course I learnt how to create arrays, object, functions,
and other major JavaScript functionalities which have helped me developing this
assignment: the reading of the book, in concurrence with numerous tutorials on
YouTube and coding lessons on CodeAcademy.org and with the help of websites
such as W3Schools, the whole learning process ended up being much easier that I
thought. Another big element which helped me understanding more during this
course was the possibility to live code alongside the teacher during the
lessons scheduled throughout the week, this facilitated understanding the
various concepts that were not clear to me while studying at home. The
availability of the teacher to always help and answer to my questions and
doubts also played a major role, since it also helped me better concentrating
and keeping a positive attitude towards the next lessons. Another important
element that I think I managed to personally develop throughout this course was
the ability to better concentrate during my tasks and duties: in coding
especially , a small single mistake can compromise the correct functioning of
whole lines of code , perhaps even the whole application itself, and this could
take a lot of time to debug, since one has to verify each line of the code to
understand where the mistake lies in order then to fix it. Maintaining the
focus while coding was essential and that helped me not only in the coding
class, but also aided me to better concentrate in other classes and courses.