Coder Social home page Coder Social logo

javascript_variables's Introduction

JavaScript_Variables

Steps

  1. Fork this repository to start a new project in your repos folder == git clone <your github repo url>
  2. cd JavaScript_Variables to navigate into your new repo directory
  3. Type the command code . to open VSC with the JavaScript_Variables folder
  4. Open the app.js file

Exercise 1: Declaring Variables

  1. Declare a variable named firstName using the const keyword, and assign your name as the string value
  2. Declare a variable named lastName using the let keyword, and assign your name as the string value
  3. Declare a variable named age using the var keyword, and assign your age as the number value

Exercise 2: Working with Strings

  1. Declare a variable named fullName using the let keyword, and assign your firstName plus your lastName as the string value
  2. Print the value of fullName to the console (to open you browser console in Google Chrome, right-click and press "Inspect" or fn+F12)
  3. BONUS: Complete step two using a template literal instead of concatenation

Exercise 3:

  1. Declare a variable named myStory using the let keyword, and assign a string with 3 sentences detailing:
    • An introduction using your fullName variable.
    • An introduction using your city variable.
    • An introduction using your favorite passtime variable.
  2. Be sure to use variables as the above answers (declare and assign variables if you haven't already)
  3. Print the result of myStory to the browser console

Ex:

let myStory = `\Hello! My name is ${fullName}. I live in ${city}. I enjoy ${passtime} and coding!`;

javascript_variables's People

Contributors

bryantellius avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.