Your First Script

Time to create a scripts folder and the main.js file. Recall that you can create folders from within the Atom editor. Control-click (right-click) ottergram in the lefthand panel and click New Folder in the pop-up. Enter the name scripts in the prompt that appears.

Then, Control-click (right-click) scripts in the lefthand panel and choose New File. The prompt will pre-fill the text scripts/. After this, enter main.js and press Return.

Make sure your folder structure looks like Figure 6.3.

Figure 6.3  Ottergram folder structure

Ottergram folder structure

The name main.js does not have any special significance for the browser, but it ...

Get Front-End Web Development: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.