What resources are there for me to use to practice JavaScript code on?

javascript

#1

I know that for Codecademy there are Codebits. But that's only JQuery, JavaScript, HTML, and CSS. I wanna practice JavaScript but I have no idea where. I tried using jsbin, but that didn't work, nothing showed up. If there are some websites or resources that I can use to execute JavaScript to practice with it, please tell me.

Thanks everyone!

Cheers​:smile:


#2

You have the principle resource in front of you... The browser. All you need now is a text editor so you create HTML pages to run the code in.

The browser has a developer tools section that includes a JavaScript Console where you can enter and run code, but you cannot save it from there so best to write it and save it (with .js extension), then copy and paste into the console.

When functions are entered they go into memory and remain there until the end of the session. If you edit a function, just enter it again. Statements are executed immediately upon entering.

A tool that is available online called Node.js lets you run JavaScript from the Command LIne but you will need to read up on this.

Dig around for IDE's that can execute JS. Myself, I just use HTML and the browser for my projects, and the console for debugging and testing.


#3

The browser has a developer tools section that includes a JavaScript Console where you can enter and run code

@mtf Yesterday I read something about a window that comes up when I press "F12" but didn't understand what it meant; is that the JS Console?


@krazykodekat, are you looking for a site where you can write and run code like we do in the lessons but without the lesson restrictions? If so can I suggest repl.it?

I know that for Codecademy there are Codebits. But that's only JQuery, JavaScript, HTML, and CSS. I wanna practice JavaScript...

If I may ask, what is the difference between Codebits JS and JS? I'd like to know because I am finishing up the JS course soon and am on the hunt for next steps, too. :slight_smile:


#4

So far, in the exercises you have been coding in the console, which in real life, we use mostly for debug purpose, it won't display anything on a webpage.

Jsbin will show up, you do need to open the console (link), and press the run button, then things will show up

I would personally just create html + js files on your computer with for example notepad++. Then you will need js functions like document.getElementById and innerHTML to show things in the webpage, or use the console unit (a youtube video for this would be good to watch, i am sure they exist)


#5

The reason I use only a text editor and a browser is because that is the native environment, with no external influences. It's text that either I or my script made into renderable HTML. I never want to lose sight of that vanilla quality. If you hear or read the term 'core JavaScript' you will know that it means, 'vanilla'. Master this and any framework or library will be a walk in the park to get the gist of.


#6

Thanks! YouTube videos exist for everything​:smile:


#7

And youtube videos are sometimes better at explaining things (in particular things you need to see) then a forum. Do ask if you have any further questions


#8

I never want to lose sight of that vanilla quality.

Does this mean one should ensure the "core JS" is be well-written before thinking about adding on libraries or frameworks, and to be aware of situations where such extras may be unnecessary?


#9

Being aware of situations is crucial to any program Core JS gives us compilable constructs to use in vanilla code. LIbraries give us ways to abstract away some of the messier bits, including cross-browser issuesm which means we write less code. It follows that we really should understand the code we are abstracting.


#10

It follows that we really should understand the code we are abstracting.

So if I plan to use a library, writing in the vanilla "framework*" first and then switching out parts of it with the library's code(?^) helps ensure that I understand what I'm abstracting?

^ I haven't learned any libraries or frameworks yet so I apologize if this is not the correct term.