srrelop.blogg.se

Javascript download for chromebook
Javascript download for chromebook








# Run arbitrary JavaScript that's not related to the page So "Hello, Console!" must be the result of evaluating document.getElementById('hello').textContent = 'Hello, Console!'. After evaluating your code, a REPL prints the result of the expression.

javascript download for chromebook

Recall the 4 steps of REPL: read, evaluate, print, loop. How the Console looks after evaluating the expression above.īelow the code that you evaluated you see "Hello, Console!". Notice how the text inside the button changes.įigure 3. Type document.getElementById('hello').textContent = 'Hello, Console!' in the Console and then press Enter to evaluate the expression. When building or debugging a page, it's often useful to run statements in the Console in order to change how the page looks or runs. # View and change the page's JavaScript or DOM This tutorial on the left, and DevTools on the right. Press Command+Option+J (Mac) or Control+Shift+J (Windows, Linux, ChromeOS) to open the Console, right here on this very page.įigure 2. When you physically follow along, you're more likely to remember the workflows later. This tutorial is designed so that you can open up the demo and try all the workflows yourself. It reads the JavaScript that you type into it, evaluates your code, prints out the result of your expression, and then loops back to the first step.

javascript download for chromebook

The Console is a REPL, which stands for Read, Evaluate, Print, and Loop.

javascript download for chromebook

See Get Started With Debugging JavaScript to learn how to pause JavaScript code and step through it one line at a time. See Get Started With Logging Messages to learn how to log messages to the Console. This interactive tutorial shows you how to run JavaScript in the Chrome DevTools Console. Var element = document.createElement( 'a') ĮtAttribute( 'href', 'data:text/plain charset=utf-8, ' + encodeURIComponent(textInput)) ĮtAttribute( 'download', filename)










Javascript download for chromebook