Talk:JavaScript/Variables and types

Contrary to what this page says, JavaScript supports pretty much all of the OO features that it says it does not.

http://intertwingly.net/wiki/pie/JavaScript

function Foo { this.test1 = function { print("Hi from foo (1)"); } this.test2 = function { print("Hi from foo (2)"); } } function Bar { Foo.apply(this); // Bar inherits from Foo this.test1 = function { print("Hi from bar") }; } var foobar = new Bar; foobar.test1; foobar.test2;

66.101.11.218 13:22, 5 Feb 2005 (UTC)

I agree. A quick google for "classes in JavaScript" and "object-oriented Javascript" shows quite a few pages about classes (and other OO features) in Javascript.
 * http://www.google.com/search?hl=en&q=classes+in+Javascript&btnG=Google+Search
 * http://www.google.com/search?hl=en&lr=&q=object-oriented+Javascript&btnG=Search

Definitely we'll want to talk about this in the JavaScript book. Should we stick information about implementing "classes" and "member methods" in Javascript at the end of the "JavaScript:Variables and types" chapter for now? --DavidCary 23:40, 15 December 2005 (UTC)
 * JavaScript can imitate classes, but it is important to stress that it does not actually have them. Instead it has a more flexible paradigm.   --Jesdisciple (talk) 09:15, 11 May 2010 (UTC)

Perhaps this is a simplistic question, but what is the definition of a "type"? Webchoc (talk) 04:53, 19 November 2009 (UTC)
 * Every constructor function is, in effect, a type. All of the basic types have constructor functions, even though best practice is to use their literal forms (if applicable) instead. --Jesdisciple (talk) 09:12, 11 May 2010 (UTC)

IIRC, JavaScript strings are Unicode. If this is true, it is important enough to go into this page. Yaronf (discuss • contribs) 11:49, 23 March 2011 (UTC)

More Types
The current primitive types in JavaScript are: undefined, null, boolean, string, symbol, number. We should probably add some sections on undefined and null as they're missing from the page. There are also object forms of Number, Boolean and String which are needed to explain why we can call methods on them. 81.187.215.34 (discuss) 15:26, 2 July 2016 (UTC)

Very outdated content!
Content seems very outdated, misses let and const which are both part of ES6 which was released in 2015 which is 8 years ago! MrUnoDosTres (discuss • contribs) 05:46, 18 January 2023 (UTC)
 * This page is no longer part of the Wikibook. I would be happy if someone deletes it. What the OP is missing, is integrated into the actual Wikibook. --Kelti (discuss • contribs) 04:32, 19 January 2023 (UTC)