GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — javascript-op-vm/arrays/length.md at master · azertyjavascript/javascript-op-vm

Expand file tree

/

length.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
24 lines (20 loc) · 499 Bytes
/

length.md

Copy path

File metadata and controls

24 lines (20 loc) · 499 Bytes
Raw
Copy raw file
Download raw file
Edit and raw actions

Length

Arrays have a property called length, and it's pretty much exactly as it sounds, it's the length of the array.

var array = [1, 2, 3];

// Result: l = 3
var l = array.length;

{% exercise %} Define the variable a to be the number value of the length of the array {% initial %} var array = [1, 1, 2, 3, 5, 8]; var l = array.length; var a = {% solution %} var array = [1, 1, 2, 3, 5, 8]; var l = array.length; var a = 6; {% validation %} assert (a === 6) {% endexercise %}

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.