ccozens / javascript-examples

Javascript modules I've written collated into one place

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Javascript examples

These are javascript modules I have written while following learning JS on CodeAcademy. I have only uploaded scripts that required very basic instructions, meaning I actually needed to write them in unguided fashion. I'd love feedback on them, and please let me know if anything weird happens.

Number guessing game

This is a simple number guessing game created following CodeAcademy's challenge project.

It runs in the browser by opening "index.html" - I wrote it on MacOS Monterey (v12.4) in Visual Studio Code 1.68.1, and tested in Chrome Version 103.0.5060.53 (Official Build) (x86_64).

The only files I have edited/added are: script.js (this began blank and the tutorial was to write it)

Cipher

A class with 2 methods to take a provided numerical value and either:

  • encrypt: takes a plain text string and returns a capitalized string with each letter shifted forward in the alphabet based on the set shift value.
  • decrypt: takes an encrypted message and returns a lower case string with each letter shifted back in the alphabet based on the set shift value.

Both classes only shift letters and wrap around the end of the alphabet.

Lodash Project

Codeacademy lodash project . This is a light-touch tutorial to recreate some functions from the lodash.js library from scratch. This was a good opportunity to practice writing methods in an object, as well as string, array and object methods. I made a point of following the tutorial as loosely as I could, meaning I read only the objectives for each section before starting to plan and code. The project comes with a number of tests, all of which pass.

About

Javascript modules I've written collated into one place

License:MIT License


Languages

Language:JavaScript 100.0%