Hey, I’m just wondering how I can get javascript appearing on the console. I’m using consle.log(); and putting in any variables I have, but nothings coming up. Wondering if anyone could help.
Thanks
Hey, I’m just wondering how I can get javascript appearing on the console. I’m using consle.log(); and putting in any variables I have, but nothings coming up. Wondering if anyone could help.
Thanks
Sorry, i’m new to coding, whats REPL? and how do you use a browser with Sublime.
In short, Sublime as a text editor is for editing your code. If you’re writing anything in JavaScript then you need to be either running your program in a browser (by opening your page in say Chrome and loading it) or by using something external like nodejs
to do it for you.
In the first case, the browser console is where your console.write()
output will appear, and in the second case nodejs
will display output for you, however you ran it.
A REPL is a Read Evalute Print Loop; something that asks you for a line of code, then executes it and shows you the result before looping back again. If you’re writing or testing simple statements that’s helpful, but if you’re writing programs, not so much.
There is a SublimeREPL package (I would not recommend it; it’s not maintained and is showing its age) that may help, but overall you should be more familiar with the process of doing things manually before you try to set down a path like that because setting up a package to do this requires you to know how to do it manually anyway.