Questions tagged [ecmascript-4]

ECMAScript 4 was the abandoned fourth edition of the ECMA-262 specification. ActionScript 3 implements parts of the draft. Mozilla has implemented several of the features in their JavaScript engine.

The draft specification included many features that were inspired other languages such as Python and C#.

11 questions
17
votes
3 answers

Why should I use string.length == 0 over string == "" when checking for empty string in ECMAScript?

Most of the developers on my current project use a (to me) strange way to check for empty strings in ECMAScript: if (theString.length == 0) // string is empty I would normally write this instead: if (theString == "") // string is empty The…
Thomas Müller
  • 15,565
  • 6
  • 41
  • 47
13
votes
4 answers

Why was ECMAScript 4th edition completely scrapped?

I've been looking for some information regarding the scrapped ECMAScript 4th Edition without much success, even on SO. I know Mozilla's JavaScript 1.7 implemented many (all?) of the new features offered in 4th Edition and I thought I remembered a…
Andy E
  • 338,112
  • 86
  • 474
  • 445
13
votes
5 answers

Javascript optional type hinting

When a programming language is statically typed, the compiler can be more precise about memory allocation and thus be generally more performant (with all other things equal). I believe ES4 introduced optional type hinting (from what I understand,…
badunk
  • 4,310
  • 5
  • 27
  • 47
2
votes
2 answers

How to get all Unicode characters from specific categories?

How to get, for example..., a code point pattern like x-y\uxxxx\Uxxxxxxxxx from the Connector Punctuation (Pc) category, for scanning ECMAScript 3/JavaScript identifiers? Original question I need help for verifying a valid character (code point) of…
user5066707
2
votes
1 answer

Is it possible to test a Javascript code for different Ecma script editions?

what I want to achieve is to test a piece of javascript code I have to see how it behaves on different versions of Ecmascript. Can I switch between versions in some kind of tool and test the code and see its behavior?
pencilCake
  • 51,323
  • 85
  • 226
  • 363
0
votes
1 answer

How to check if a particular string is in the innerhtml or not?

Let's assume here has a bunch of html like this:

High noon

Highest rank!

Using the querySelectorAll to get them all: const pList = document.querySelectorAll("p"); Then I want to know does the string "high" exist in each node in…
Anran Qin
  • 7
  • 3
0
votes
3 answers

How to get all combination of the values from a 2D array's rows with JavaScript?

the 2D array I'm working with have different length for each row, something like: var a = [2, 5, -12, 9]; var b = [54.0, 0.3]; var c = ["tree", "sun", "pool"] var all = [a, b, c] Any row in the 2D array might be zero sometimes. The array above is…
Anran Qin
  • 7
  • 3
0
votes
0 answers

How does Unicode 5 differ from Unicode 2 (ECMAScript 4)?

Please excuse me, I really need to know how does the incorporated Unicode version (5) works in ECMAScript 4. I just need to know how it's encoded or decoded, or which encoding does ECMAScript 4 use. I'm saying about the encoding used for char codes…
user5066707
0
votes
0 answers

ECMA Script 4 - what's the story behind?

I am researching the history of Java Script and spent hours trying to understand what has happened to ECMA Script 4 standard. What were the differences between ES3 and ES4? So, what's the story behind it's being abandoned? Thank you UPD: The answer…
Vasyl Boroviak
  • 5,959
  • 5
  • 51
  • 70
0
votes
0 answers

What standard Siebel eScript actually based on?

According to Siebel 8.0 documentation eScript is compliant with ECMAScript Edition 4 standard. But as far as I have learned there is no such standard published. Edition 4 was in draft state for a long time, but was never released. ECMA's website…
Yaroslav Shabalin
  • 1,645
  • 3
  • 17
  • 29
0
votes
1 answer

How to upload image file into the SharePoint 2010 picture library using ECMA Script

I need to upload image file into the sharepoint 2010 picture library using java script... requirement is -- 1.we have File Upload control 2.And, we have to upload image file from that file upload control Please see code...But this code is not…