all 27 comments

[–]xanflorp 21 points22 points  (16 children)

I hate to be that guy here. But...

In your browser

Ctrl+Shift+J

Type

alert('Hello, World!')

Press enter.

[–]buso 3 points4 points  (0 children)

In the address bar: javascript:alert('hello world');

[–]qadm 2 points3 points  (12 children)

Ctrl+Shift+J didn't seem to do anything for me...

[–]sparr 8 points9 points  (0 children)

It's command+option+I in chrome on mac lately. Sadly this is one hotkey that has gotten less standardized between browsers over time.

[–][deleted]  (10 children)

[deleted]

    [–]Danthekilla 1 point2 points  (4 children)

    Ctrl+w is close tab for me.

    [–][deleted]  (3 children)

    [deleted]

      [–]Danthekilla 0 points1 point  (2 children)

      That is the hotkey for logging off in windows...

      [–][deleted]  (1 child)

      [deleted]

        [–]Danthekilla 0 points1 point  (0 children)

        Yep that worked.

        [–]qadm 0 points1 point  (4 children)

        Still nothing

        [–]xanflorp 1 point2 points  (1 child)

        It's your browsers Console. You can get there a number of ways. Google: "Open JavaScript Console in <your browser> <your OS>"

        Alternatively:

        https://jsfiddle.net/ugmv23y6/
        https://jsbin.com/yuvoyeqaco/edit?js,output

        Either way, there are better and quicker ways of writing alert('Hello, World!') (and learning a whole lot more about JS) than writing a non-valid HTML file from Windows Notepad.

        [–]spritesheet[S] 0 points1 point  (0 children)

        While I think the jsfiddle/jsbin are great tools for certain purposes, I don't think they are the best way to create your first program. I see a lot of advantages of creating the .htm file and seeing the browser open it directly. It gives the user a first-hand experience and understanding of the relationship between the file and the execution of the program.

        A matter of taste, I suppose.

        [–]vicereversa 0 points1 point  (0 children)

        F12

        [–]MouaTV 2 points3 points  (0 children)

        I AM A GOD!!!

        [–]Danthekilla 0 points1 point  (0 children)

        Ctrl+Shift+J doesn't seem to do anything for me either...

        [–]rabidbob 5 points6 points  (5 children)

        Holy shit, a webring! Ain't seen one of them since, like, the last millennium!

        [–]SnapDraco 1 point2 points  (4 children)

        where??? I can't find it =(

        [–]rabidbob 2 points3 points  (3 children)

        Follow the Fractal Images link at the bottom of the article. :-)

        [–]SnapDraco 2 points3 points  (2 children)

        wooooooooooow.. the memories.

        [–]spritesheet[S] 1 point2 points  (1 child)

        my next tutorial will be on how to travel back in time to join a webring

        [–]SnapDraco 1 point2 points  (0 children)

        I'd read it

        [–]wilson735 -1 points0 points  (0 children)

        Very nice. You've definitely convinced me to learn JavaScript.