DEV Community

benboorstein
benboorstein

Posted on • Edited on

Quick Notes Based On "Numbers, Strings, and Booleans" Section of Frontend Masters' "Complete Intro to Web Development, v2"

What I did (in code):

    const myFirstName = 'Ben'
    const myLastName = 'Boorstein'

    const sentenceOldWay = 'Hi, ' + myFirstName + ' ' + myLastName + ', ' + 'how are you?'
    const sentenceNewWay = `Hi, ${myFirstName} ${myLastName}, how are you?`

    console.log(sentenceOldWay)
    console.log(sentenceNewWay)

    Logs: Hi, Ben Boorstein, how are you?
    Logs: Hi, Ben Boorstein, how are you?

What I did (in English):

  • I declared a const variable called myFirstName and stored in it (i.e., assigned to it) 'Ben' (a string).
  • I declared a const variable called myLastName and stored in it (i.e., assigned to it) 'Boorstein' (a string).
  • I declared a const variable called sentenceOldWay and stored in it a string that combined the above variable strings and new strings, and I did this the old way, i.e., using string concatenation.
  • I declared a const variable called sentenceNewWay and stored in it a string that combined the above variable strings and new strings, and I did this the new way, i.e., using template literals (aka template strings).
  • I logged both sentenceOldWay and sentenceNewWay to the console.

What I practiced:

  • Same as above.

What I learned:

  • From the above code, I didn't learn anything new.
  • From other parts of this section of instruction, I didn't learn anything new, because I already knew it. But I was reminded that in JS what we would, in regular English, call integers and decimal numbers are both just considered Numbers, and that in JS decimal numbers are called 'floats'.

What I still might not understand:

  • Nothing for this section.

Heroku

The AI PaaS for deploying, managing, and scaling apps.

Heroku tackles the toil — patching and upgrading, 24/7 ops and security, build systems, failovers, and more. Stay focused on building great data-driven applications.

Get Started

Top comments (0)

Hosting.com image

Your next WordPress project? Deployed for $1.

This Black Friday, hosting.com powered by Rocket.net gives you fully Managed WordPress Hosting for just $1 in your first month.
No setup headaches. No caching chaos. Just pure speed with Cloudflare Enterprise CDN, advanced security, and automatic updates.

Whether it is a side project or your next client build, you will be live in minutes. Grab the $1 deal and start building.

Learn more

👋 Kindness is contagious

Dive into this insightful article, celebrated by the caring DEV Community. Programmers from all walks of life are invited to share and expand our collective wisdom.

A simple thank-you can make someone’s day—drop your kudos in the comments!

On DEV, spreading knowledge paves the way and strengthens our community ties. If this piece helped you, a brief note of appreciation to the author truly counts.

Let’s Go!