How to use javascript functions, defined in some external *.js file in browser's javascript console?

Posted by Dmytro Tsiniavsky on Pro Webmasters See other posts from Pro Webmasters or by Dmytro Tsiniavsky
Published on 2012-11-22T10:12:23Z Indexed on 2012/11/22 11:14 UTC
Read the original article Hit count: 271

Filed under:

I would like to know is it possible to save some, for example,simplemath.js file with

function ADD(a, b)
{
   return a + b;
}

simple function, run opera's or some other browser's javascript console, include somehow this (simplemath.js) file, call ADD(2, 5), and get a result in console or execute javascript code on current web page and manipulate with it's content. How can I do that? How can I use javascript functions from external files in web-browser's javascript console?

© Pro Webmasters or respective owner

Related posts about JavaScript