[
    {
        "name": "author-speak-before",
        "value": "Today, we're going to learn about how to use the console.log function in JavaScript."
    },
    {
        "name": "author-speak-before",
        "value": "I've already got a hello-world.js file prepared here - let's open it up."
    },
    {
        "name": "click-filename",
        "value": "hello-world.js"
    },
    {
        "name": "click-editor",
        "value": "1"
    },
    {
        "name": "author-speak-before",
        "value": "Now, to log things to your console, simply make a call to the console.log function, passing in the text you want to log."
    },
    {
        "name": "editor-type",
        "value": "console.log('Hello, world!');"
    },
    {
        "name": "save",
        "value": "1"
    },
    {
        "name": "author-speak-before",
        "value": "Now we'll open up a terminal and run this file."
    },
    {
        "name": "open-terminal",
        "value": "1"
    },
    {
        "name": "click-terminal",
        "value": "1"
    },
    {
        "name": "terminal-type",
        "value": "node hello-world.js"
    },
    {
        "name": "enter",
        "value": "1"
    },
    {
        "name": "wait",
        "value": "2000"
    },
    {
        "name": "author-speak-before",
        "value": "And of course we get the expected output - 'hello world!' printed to the console."
    },
    {
        "name": "author-speak-before",
        "value": "but this is a bit of a boring example, let's create a way overengineered solution. Let's move our logging to a function."
    },
    {
        "name": "author-speak-before",
        "value": "First, we'll make a folder called 'utils' and a file called 'logger.js' inside it."
    },
    {
        "name": "create-folder",
        "value": "utils"
    },
    {
        "name": "create-file",
        "value": "utils/logger.js"
    },
    {
        "name": "click-filename",
        "value": "logger.js"
    },
    {
        "name": "click-editor",
        "value": "1"
    },
    {
        "name": "author-speak-before",
        "value": "Now, let's create a function in this file that will log a message to the console."
    },
    {
        "name": "editor-type",
        "value": "function log(message) {\n    console.log(message);\n}"
    },
    {
        "name": "save",
        "value": "1"
    },
    {
        "name": "author-speak-before",
        "value": "Now, let's import this function into our hello-world.js file and use it to log our message."
    },
    {
        "name": "click-filename",
        "value": "hello-world.js"
    },
    {
        "name": "click-editor",
        "value": "1"
    },
    {
        "name": "editor-type",
        "value": "const log = require('./utils/logger');\n\nlog('Hello, world!');"
    },
    {
        "name": "save",
        "value": "1"
    },
    {
        "name": "author-speak-before",
        "value": "Now we'll run this file again."
    },
    {
        "name": "click-terminal",
        "value": "1"
    },
    {
        "name": "terminal-type",
        "value": "node hello-world.js"
    },
    {
        "name": "enter",
        "value": "1"
    },
    {
        "name": "wait",
        "value": "2000"
    },
    {
        "name": "author-speak-before",
        "value": "And we get the same output as before. We could go on and add complexity to our logger function, but we'll save that for a later lesson."
    },
    {
        "name": "author-speak-before",
        "value": "This is a simple example, but it shows how you can use the console.log function to log things to your console in JavaScript."
    }
]