I'm a beginner js. My question is: should we always use a browser to test JS code? Is there an avilable command line compiler / interpreter?
Rhino and Spidermonkey provide standalone interpreters, but you will need to find a DOM implementation if you want to test DOM manipulation, and you need to test in any browsers that you aim for (not all JS engines are created equal).
a , - -, , , , , (, , ). , , , .
, (, , ), , dev, .
Javascript , - Firebug, Firefox , Javascript-. , javascript, ( , , ).
JavaScript - , . . , .., , JavaScript. , Windows Script Host - . - - document, window, body, getElementById - , . - .
getElementById
JavaScript - , JS Selenium. (PHP, Ruby, Java) (, Ruby on Rails...) .
Selenium . , , : Firefox, IE, Opera, .
Selenium - .
, alternatives.
Yes you should. Since the standard is not respected, each browser may behave depending on your code. Therefore, it is better to check it in browsers.
Source: https://habr.com/ru/post/1766957/More articles:Sequential Date String - sqlΠ‘# ΠΡΠΎΠ±Π»Π΅ΠΌΠ° Π°ΡΡΠ΅Π½ΡΠΈΡΠΈΠΊΠ°ΡΠΈΠΈ webservice ΠΌΠ΅ΠΆΠ΄Ρ Π΄Π²ΡΠΌΡ Π²Π΅Π±-ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡΠΌΠΈ - c#Deploying ASP.Net MVC on IIS6, why am I getting 404 after enabling group mapping? - asp.net-mvcWhat are the internal processes for compiling C? - cC # REST Web Service Authentication Problem - authenticationIs there a MonoTouch.Dialog port for Silverlight / wp7? - windows-phone-7How to create an application that works on both a Windows 7 phone and an iPhone? - iphone.NET 3.5: Anonymous Delegate for Handlers with Ref Parameters - c #Globalization Localized Nightmare - c #An interesting Python idiom for removing a single item in a single list of entries - pythonAll Articles