JavaScript Tutorial 9 - Finding the length of arrays and strings in JavaScript

preview_player
Показать описание

This tutorial explains how to find the length of an array (how many elements are in an array), the length of an element in an array, and the length of a string of text (how many characters in a string).
Рекомендации по теме
Комментарии
Автор

Daniel could you help me with this code, I need to create a JavaScript code to show me only the words that tenon up to 4 characters.
The words are: João, José, Maria, Sebastião and António.
I tried to use this, but I did not succeed, you could do a code showing me, I'm a beginner in JavaScript.

My code:
var people = [];
people [0] = "Juan";
people [1] = "Jose";
people [2] = "Mary";
people [3] = "Sebastian";
people [4] = "Antônio";

alert (people [4]. length);

edusous
Автор

i do exactly the same thing, but returns undefined.

pedrobraga
Автор

Var array =["bmw", "corolla", "audi"];
Document.write(array.lenght);
Showing answer undefined
Someone help me

yawarkhan
welcome to shbcf.ru