/cipher

cipher

Primary LanguageJavaScript

Cipher

By Rosemary Ojwang

A cipher app for encoding sentences from users

Technologies Used

  • HTML
  • JavaScript

Description

The app prompts the user, through window.prompt, to enter a sentence. It then copies the first and last letters, through slice() method, of that sentence, capitalizes through toUpperCase() method, reverses using split(""), reverse() & join("") methods, and concatenates ,through concat() method, them to the end of the sentence entered.

The middle character of the original sentence is then copied, through charAt() method and concat() methods, to the beginning of the resultant sentence. And finally, it reverses the entire new sentence produced, and returns and displays the same through window.alert() method.

Setup/Installation Requirements

  1. Clone this repository to your desktop.
  2. Navigate to the top level of this directory.
  3. Open index.html fron your browser.

License

_MIT

_Copyright (c) 2020 Rosemary Ojwang