beanz Magazine April 2019

Page 7

5

MIKE PETRUCCI, UNSPLASH

</div> you put things you want to group together. CSS determines how your HTML looks on the screen. The default CSS in your project will look like /* CSS files add styling rules to your content */ body { font-family: "Benton Sans", "Helvetica Neue", helvetica, arial, sans-serif; margin: 2em; } h1 { font-style: italic; color: #373fff; }

B

This makes a pretty good example of what CSS looks like in general! It's a mixture of selectors, like body and h1, and then the properties that you're changing. Finally, JavaScript is the thing about which you may have heard the most. It's the programming language that makes the web work! Every browser has a JavaScript interpreter built into it that runs the JavaScript in each website. The default JavaScript in this project has only a single line: console.log('hi'). If you go to the preview of your project then you can open the JavaScript console and see that this code wrote "hi" to the console's output. You can find a comprehensive list of how to open the console in different browsers here: https://webmasters. stackexchange.com/ questions/8525/how-doi-open-the-javascriptconsole-in-differentbrowsers. With this overview complete, let's talk about the social media aspects of Glitch. You can go to the front page of Glitch and browse through categories or search for other people's projects to look at, but let's pick a particular example. Navigate to https://glitch. com/~space-invaders.

Once you're on this page you can click on the button that says show to try the game. You can also click on "view source" to look at the project itself. (This is like the "See Inside" button you might be familiar with from Scratch.) I picked this project because it's very clean and well commented. You can't actually do anything with it from here other than look at it, though! So go to the button in the upper right corner of the screen that says "Remix to Edit". Click that to copy the project for yourself and play around with the code. I’d recommend trying to modify the speed of bullets to make the game go a little faster. From here, I recommend that you follow some of the recommended Glitch projects found in the online version of this article. Don't be afraid to remix everything in sight! b

C


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.