JavaScript & Things

Last night I’ve completed the Intermediate JavaScript Nanodegree from Udacity, a California based company that offers a wide range of online courses. People all over the world learn with their desktop computer or on their smartphone — whenever and wherever they would like.

I first came across Udacity in 2017, when I was looking to take React seriously, but before I committed to pay their steep fee, I've tried a few of their free offers, and after a few I was sold.

Since then I completed their React, C++, Cloud Developer and finally Intermediate JavaScript program.

What is the Intermediate JavaScript Nanodegree?

“The goal of the Intermediate JavaScript Nanodegree program is to prepare students for roles in web development, server-side application development, and desktop development that require a more advanced set of JavaScript skills.”

The student will learn to use functions as values (JavaScript treats its functions as first-class citizens), pass functions as arguments to other functions, identify when a scope is created, leverage closure to capture variables within a scope chain and use the same to create privacy in data. These are powerful concepts that changed how I approach others aspects of javascript, from OOP to DOM manipulation.

Throughout the course I’ve built react-like apps using mostly vanilla javascript, which in turn deepened my understand of React, state management and Higher-Order Functions (HOF’s). Here's a quick example:

// Set up store
let store = {
  user: {
    first_name: 'John',
    last_name: 'Doe'
  }
}

const render = (root, state) => {
  root.innerHTML = App(state)
}

const Welcome = (name) => {
  return `Welcome, ${name} to my JavaScript Program!`
}

const App = (state) => {
  return `
    <h1>${Welcome(state.user.first_name)}<h1>
    <div> I EXIST! </div>
  `
}

window.addEventListener('load', () => {
  render(root, store)
})

// if state changes at some point in our app
const updateStore = (store, newState) => {
  store = Object.assign(store, newState)
  render(root, store)
}

All in all, I would definitely recommend this course to anyone looking to take that next step in their javascript journey.