Run JavaScript (incl. jQuery, Ember.js and Handlebars) online with JS Bin

While I was browsing a bit around, I did find a nice site called **JS Bin**:

JS Bin is a webapp specifically designed to help JavaScript and CSS
folk test snippets of code, within some context, and debug the code
collaboratively.

So you can register and create an own account with JS Bin. After that, you can upload code, run it and share it with others. One of the nice features is that you can add libraries like jQuery, Ember.js and Handlebars.

So if you are thinking about getting prepared for Stonehearth, this might be a nice way to play around with JavaScript and share some code.

P.S. And a possible starting point for Ember.js could be this one.

3 Likes

jsFiddle is also a site to use for things like this

2 Likes

I definitely recommend JSFiddle for this. :thumbsup:

1 Like

Or else there is the cloud9 IDE. Itā€™s support a nice range of languages, there is even some lua support on the commandline. And since itā€™s an online cloudbased IDE, setup is really easy for beginners.

1 Like

Iā€™ve used cloud9 IDE before and it is good. However, for stonehearth modding, the only thing itā€™s going to be able to do effectively is HTML, CSS, and Javascript. (In other words, UI stuff)

Even though it has command-line lua support, I donā€™t think it could run Stonehearth, which it would need to for you to fully test your mod.

Honestly, for HTML, CSS, and Javascript, you can use any text editor and your favorite browser on your local machine just fine. I recommend Sublime Text as a good text editor. It has an unlimited free trial. (Though you should pay the guy if you like it; itā€™s really great)

1 Like

Iā€™m trying to figure out JS online, but I canā€™t get this code right, for some reason. I tried to simply call the function three times, like
creditCheck(75);
creditCheck(125);
creditCheck(100);

but that didnā€™t seem to work. Can anyone tell me what Iā€™m doing wrong?

Remove the comma after Alas. Codecademy is picky with those things :stuck_out_tongue:

1 Like

Yeah, as Warstories pointed out, the string that Codecademy was expecting isnā€™t the same string you gave them. Although yours may be more grammatically correct, programming is like that. For example, if you say if (ā€œstringā€ == ā€œStringā€) {
ā€¦(random code)ā€¦

} This wonā€™t do anything, as the S is capitalised in the second ā€˜Stringā€™.

flfkldsjajfā€¦

Stupid Codeacademy and your awful grammarā€¦

I completely forgot that I had done thatā€¦ Thanks.

1 Like

unless of course strtolower :stuck_out_tongue:

1 Like

His point was perfectly valid to show that case matters, using case changers is just a very useful technique in a lot of places. Also that function doesnā€™t exist in js, itā€™s str.toLowerCase

1 Like

Yeah, got it mixed up with php, same principle though