Password generator - JavaScript


User can select password that can contain eiter: lower case, upper case, digits or special characters. User can choose password length between 8-128 characters. Initial setting is 12 characters.

How code works:
Based on user selection, "working string" is created that is used to pick up random characters from. I am using function in the loop (based on password length) to pick up random characters from "working string". After password is generated I am doing addtitional check if password contains characters required by user. If it does not contain required characters then password generation is invoked again. User has an option to copy password string to computer/mobile clipboard.

GitHub

Weather Dashboard - JavaScript


Application uses API from https://openweathermap.org/ to display current and 5 day forecast weather data. There are 3 API calls:

  • current weather
  • UV index for city
  • 5 day forecast for city

How code works:

  • User can search city using search box
  • City will be added to quick search list below. It can be clicked to search again
  • In upper panel user can see current weather conditions for given city
  • in panel below forecast for next 5 days is shown
  • Searched items are kept on the list during page refresh

Applications uses:

  • bootstrap for some elements
  • moments.js for some date formatting
  • CSS grid layout

GitHub

Quiz - JavaScript


Rules of the game:

  • Choose answer to the question, you have 60 sec to answer as many questions as you can
  • If question is correct then you score 1 point and next question is presented
  • If question is folse, your available time decreases by 5s
  • Game lasts until time is finished or questions are finished
  • After game you can add your nick name to hall of fame

Application consistis of 3 main modules:

  • initD - initiatlization of data -> it defines arrays of objects with questions and answers
  • dataCtrl module - used for selecting questions, adding, retrieving names for hall of fame
  • appCtrl module - main logic app for game; starting game, next question selection, result check, timer control

Application layout works well for desktop and mobile browser. On mobile it colapses into single column. Layout is built using bootstrap.

GitHub