Category: javascript

Web programming: AngularJS, part 2

The tutor shows an example of AngularJS in action, with JavaScript’s Math.pow(x,y) function. JavaScript’s function Math.pow(3,4) evaluates 34, giving the answer 81. In that expression, 3 is the base, while 4 is the exponent. Below, you can input a base

Tagged with: ,

JavaScript: string functions: substr() vs substring()

The tutor describes the difference between substr() and substring() Let’s imagine the string variable var strng_ex=”this_example_string”; The function substr(4,5) returns 5 characters from the string, starting at the fourth position (which is _, since the first position is 0): strng_ex.substr(4,5)

Tagged with:

JavaScript: literal string with the concat() function

The tutor shares an observation about the concat() function. The concat() function is used to join one or more strings to the end of another: var strng0 = “This string, “; var strng1 = “then this one” var strng2 =

Tagged with: ,

Web design: a JavaScript wrapper for SVG in WordPress

The tutor shows an example of a wrapper program in action. To my knowledge, a wrapper is a program that hides a function that the managing system can’t handle. The “wrapping” is code that the managing system recognizes as the

Tagged with:

Computer science: JavaScript: null value, undefined type and value

The tutor comments on JavaScript null and undefined. Null, it seems, is often mentioned in computer science. Perhaps it’s used a little loosely: it might refer to the value read when there’s nothing there, or the value of a variable

Tagged with: ,

JavaScript: fun with string operations

The tutor offers a fun demo with a couple of string functions and setInterval. Source: w3schools w3schools Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Tagged with: , ,

jsDraw2DX Test

The tutor tests graphics with the jsDraw2DX library. jsDraw2DX is a graphics library for JavaScript. I’d call it object-oriented: for programmers used to that style, it may be very intuitive. The tilted text above was generated from the following code:

Tagged with: ,
Top