Automatically translated.View original post

array JavaScript

# Web Site Writing Basics

# javascrip

# array

An Array in JavaScript is a sequenced list data structure used to store multiple values in a single variable.

Key attributes of arrays in JavaScript

Storage of multiple values: An array allows you to store different values (such as numbers, strings, objects, functions, or even other arrays) under a single variable name.

Index Access: Each member of the array is assigned a numerical index. Starting at 0 for the first member, 1 for the second, and so on. You can access or edit each member using this index.

Dynamic Size: Arrays in JavaScript can grow or shrink during program execution (no fixed size needed to be defined in the first place).

Mixed data types: Members within the same array, not necessarily the same data type (e.g. you can have numbers, strings, and booleans in the same array)

Array Creation

You can create arrays in many ways, but the most common is to use square brackets ([]):

JavaScript

/ / Create an empty array.

Let emptyArray = [];

/ / Create an array with members.

Let fruits = ["Apple," "Banana," "Cherry"];

/ / Create an array with mixed data types.

let mixedArray = [10, "Hello," true, {key: "value"}];

Access and editing members

Use the index within square brackets ([]) to access members:

JavaScript

Let colors = ["Red," "Green," "Blue"];

/ / Access to members

console.log (colors [0]); / / Result: "Red" (first member)

console.log (colors [2]); / / Result: "Blue"

/ / Membership amendments

Colors[1] = "Yellow";

console.log (colors); / / Results: ["Red," "Yellow," "Blue"]

/ / Monitoring the length of the array

console.log (colors.length); / / Results: 3

Arrays are a very basic and important tool in JavaScript programming for data set management.

2025/10/5 Edited to

... Read moreถ้าเจอคำว่า “array” แล้วอยากรู้ว่า array แปลว่าอะไรแบบสั้นๆ: โดยทั่วไปแปลได้ว่า “อาร์เรย์” หรือ “ชุดข้อมูล/รายการข้อมูล” คือการเอาค่าหลายๆ ค่า (เช่น ตัวเลขหรือข้อความ) มาวางเรียงกันเป็นลำดับ เพื่อให้จัดการได้ง่ายขึ้นในตัวแปรเดียว ใน JavaScript เวลาเราใช้ Array จะรู้สึกเหมือนมี “ลิสต์” เก็บของหลายชิ้นไว้ด้วยกัน เช่น เก็บตัวเลข 1–5 หรือเก็บชื่อผลไม้หลายชื่อ พอเป็นชุดข้อมูลแล้ว เราจะหยิบทีละชิ้นออกมาได้ด้วย “index” (ดัชนี) ที่เริ่มจาก 0 เสมอ ตัวอย่างที่เห็นบ่อยมากคือ - numbers = [1,2,3,4,5] (Array เก็บตัวเลข) - fruits = ["มะม่วง","มังคุด","ทุเรียน"] (Array เก็บข้อความ/สตริง) - mixedArray = [100, true, "javascript", {}] (เก็บข้อมูลหลายประเภทใน Array เดียว) สิ่งที่มือใหม่มักพลาดเวลาอ่านว่า “array แปลว่า” คือเข้าใจว่าเป็นแค่คำศัพท์ แต่จริงๆ มันเป็นแนวคิดสำคัญในการเขียนโปรแกรม: เราใช้ Array เพื่อจัดการข้อมูลหลายค่า เช่น รายการสินค้า คะแนนสอบ รายการงานที่ต้องทำ หรือข้อมูลที่ได้จาก API ทริคจำง่ายๆ ที่ผมใช้คือ “Array = กล่องยาวๆ ที่มีช่องเรียงกัน” - แต่ละช่องคือ element (สมาชิก) - เลขหน้าช่องคือ index (เริ่ม 0) ตัวอย่างการใช้งานที่ช่วยให้เห็นภาพ: 1) อยากหยิบ “สมาชิกตัวแรก” ออกมา fruits[0] จะได้ "มะม่วง" 2) อยากเปลี่ยนค่าช่องที่ 2 (index 1) fruits[1] = "เงาะ" ก็จะแทนที่ "มังคุด" 3) อยากรู้ว่ามีกี่ตัว fruits.length จะบอกจำนวนสมาชิกทั้งหมด สรุปอีกที: ถ้ามีคนถามว่า “array แปลว่าอะไร” ในบริบท JavaScript ให้ตอบได้เลยว่า “ชุด/รายการข้อมูลที่เรียงลำดับ เก็บหลายค่าในตัวแปรเดียว และเข้าถึงด้วย index” แค่นี้ก็ตรงเจตนาค้นหา และเอาไปต่อยอดเขียนโค้ดได้ทันที

Related posts

How I’d Learn JavaScript If I Were Starting Again
#javascript #coding #programming #tech #codingforbeginners
Aysha

Aysha

124 likes

A man with tattoos and a cap sits at a desk, coding on a large monitor in a dimly lit room. Text overlays read 'SWIPE', 'Learning JavaScript?', and 'This is for YOU!', with a thinking emoji, promoting coding education.
A man with headphones and a cap codes at a desk with a large monitor displaying code. Text overlays read 'SWIPE', 'Break vs Continue', and 'In JS loops', with a thinking emoji, highlighting JavaScript loop concepts.
A man with headphones and a cap sits at a desk, coding on a large monitor in a bright room. Text overlays read 'Let's Discuss!' with a thinking emoji, inviting interaction about coding topics.
Coding W/ JavaScript?
As a software engineer w/ ADHD, understanding the difference between certain syntax keywords is critical, such as ‘continue’ and ‘break’ within JavaScript loops.💡 It’s almost like centering a <div> — it takes practice to feel confident in your abilities. 🛠️ When my mind gets stuck in a
Michael Burbank

Michael Burbank

13 likes

My Programming Interest Just Skyrocketed! 🚀
I just discovered something that has made my interest in programming explode to 1000000000000000%! 🤯 🎮 Learning Programming is Like a Game Adventure! From Python, Java, JavaScript, to HTML, there are all kinds of programming languages available, along with systematic topic courses. The learning p
Valder

Valder

2175 likes

Day 2 introduces JavaScript variables, depicted as a box storing `let name = "Aysha";`. The image encourages learning to store and manage data like a pro, setting the stage for understanding variables in programming.
This image defines a variable as a box holding information. It visually represents `name = "Aysha";` with "name" as the variable name on the box and "Aysha" as the value inside, illustrating the concept clearly.
Explaining why variables are used, this image shows `userName`, `city`, and `age` variables storing data like "Aysha", "New York", and 26. It highlights their role in reusing data within code.
What Are Variables in JavaScript
In JavaScript, variables are like boxes that store information such as a user’s name, city, or age. We use them to make our code flexible and reusable. #CodeWithAysha #JavaScriptForBeginners #LearnJavaScript
Aysha

Aysha

3 likes

Codes i’ve created for mine cymatics experiment 🫶
odes i’ve created for mine cymatics experiment
Evony Nard

Evony Nard

1 like

It may or may not depend on your effort.🫡
It sounds contradictory but everyone has their perfect time to learn new frameworks, so do not despair and do it without fear but with patience 😎 #lemon8diarychallenge #webdevelopment #programmer
Feibertord ⚡️

Feibertord ⚡️

15 likes

A person with arms outstretched stands before a waterfall, with text overlay "5 Free Apps to Learn Coding ft. Anjali Viramgama". The image promotes coding education.
A graphic featuring the SoloLearn logo and a description of the app's interactive coding courses in Python, JavaScript, and Java, on a torn paper background with a blue chevron pattern.
A graphic featuring the Mimo logo and a description of the app's interactive coding lessons for Python, Java, JavaScript, HTML, and CSS, presented on a torn paper background with a blue chevron pattern.
5 free apps to learn coding
There are several free apps available that can help you learn coding. here are five free apps that are popular for learning coding: 1. SoloLearn: SoloLearn offers a variety of programming courses, including Python, JavaScript, Java, and many others. It's a community-driven app where you can
anjali.gama

anjali.gama

932 likes

Learn Coding the Easy Way!
#LearnToCode #CodingTutorials #ProgrammingForBeginners #TechEducation #CodeWithMe
InsightEvolution

InsightEvolution

2 likes

penny

penny

0 likes

Programming language speed comparison
Programming languages exhibit different execution speeds because they make different tradeoffs in compilation strategy, runtime overhead, memory management, and abstraction level, which affects how efficiently code is translated into machine instructions and executed by the CPU Here I visualize
Learn Linux with Dan

Learn Linux with Dan

2 likes

An infographic illustrates web browser fingerprinting, categorizing attributes collected to create unique user profiles. It lists HTTP headers, input/interaction, browser config, system/device info, network connectivity, graphics/rendering, capabilities, and behavioral/timing data points.
Web browser fingerprinting
Web browser fingerprinting is the technique of uniquely identifying and tracking a device by collecting and correlating its exposed system, browser, and network attributes during web interactions Here are a categorized list of attributes collected as part of browser fingerprinting 😎👆 #privacy
Learn Linux with Dan

Learn Linux with Dan

17 likes

The Most In-Demand Programming Languages in 2025
#codingforbeginners #htmlcssforbeginners #studymotivation #programming #softwareengineering
Aysha

Aysha

30 likes

Semantic HTML
Did you know that using Semantic HTML makes your website more accessible, improves SEO, and enhances user experience? #webaccessibility #semanticHTML #webdevelopment #webdesign #frontenddevelopment
Aysha

Aysha

4 likes

JavaScript Cheat Sheet
Essential JavaScript commands every developer needs! 🚀 Variables, functions, loops, arrays & DOM manipulation all in one quick reference guide. Perfect for coding interviews or daily development. Save this for later! 💾 #JavaScript #WebDev #Programming #Coding #Developer #JS #CodeTips
EM

EM

2 likes

Best - FREE - coding sites
learning to code is important and a great look for your resume! plus it’s fun! ANYONE CAN LEARN! these are my favorite sites I’ve utilized to learn new skills! #codinggirl #codingforbeginners #embracevulnerability #shareyourthoughts #Lemon8Diary
LOLLIPOPAK

LOLLIPOPAK

2980 likes

JavaScript Cheat Sheet
Essential JavaScript commands every developer needs! 🚀 Variables, functions, loops, arrays & DOM manipulation all in one quick reference guide. Perfect for coding interviews or daily development. Save this for later! 💾 #JavaScript #WebDev #Programming #Coding #Developer #JS #Code
EM

EM

1 like

HTML + CSS + JavaScript = MAGIC! 🔥
HTML alone is just a structure, CSS adds style, but JavaScript brings it to life! 🚀 Watch how I build this Digital Clock from scratch using HTML, CSS & JavaScript! 👨‍💻💡 Try it yourself & level up your coding skills #codingforbeginners #htmlcssforbeginners #studymotivation #learntocod
Aysha

Aysha

3 likes

What Is JavaScript? (Beginner Friendly)
JavaScript is what turns a website from static to interactive. In Day 1 of this beginner-friendly JavaScript series, I explain: • what JavaScript is • why websites feel “alive” • how JavaScript works with HTML and CSS #learnjavascript #codingforbeginners #webdevelopment #codewit
Aysha

Aysha

9 likes

5 Free Online Certification Sites to Boost Resume
5 Free Online Certification Sites to Boost Resume Hi, lemons! Today's digital landscape offers a wealth of professional development opportunities right at our fingertips. Enhancing your skills and expanding your knowledge has never been more accessible or more critical. Here are five sites o
Lifestyle Babe

Lifestyle Babe

6960 likes

How to Learn Coding Fast Even as a Beginner
#codingforbeginners #programming #studymotivations #webdevelopment #learntocode
Aysha

Aysha

801 likes

Tech jobs you can do without prior experience 🖥️
🖥️ 👩‍💻Web Developer : Build and maintain websites, ensuring they are functional, user-friendly, and visually appealing. Work with front-end and back-end technologies like HTML, CSS, JavaScript, and databases. 💰 Starting Salary: $55,000 - $65,000 per year 📊📈 Data Analyst: Analyze and interpret
vedha | career tips (tech) 👩‍

vedha | career tips (tech) 👩‍

3624 likes

useState in 60 seconds
Most React beginners overthink state. Here's all you need to know 🧠 #ReactJS #WebDev #LearnToCode #FrontendDev #JavaScript
Alexander Kazanski

Alexander Kazanski

1 like

Skills You Need For WEB DEVELOPMENT!!
💻If you've ever wondered what you need to know to do web development then this post is for you! I have laid out the basics, frameworks, backend, design tools, and bonus tools that you will most likely need to learn to become a web developer! Websites are quite complicate and layered, and they
CompSkyy

CompSkyy

141 likes

This chart illustrates the IEEE Spectrum's Top-10 Programming Languages rankings from 2018 to 2024. Python consistently holds the top spot, while Java, C, C++, and JavaScript remain strong. The chart also shows the emergence and rise of languages like SQL and TypeScript over these years.
Top programming language evolution
This chart shows how top-10 programming languages have changed over the years. It highlights Python’s consistent dominance while Java, C, C++, and JavaScript remain strong, with newer contenders like SQL and TypeScript rising in recent years 😎👆 #programming #coding #upskill #tech #softw
Learn Linux with Dan

Learn Linux with Dan

7 likes

Well paying tech jobs 👩‍💻💰🤩
1. Software Engineer - $110,000 per year - Software engineers design, develop, and maintain software systems. They work on everything from apps to system-level software, utilizing languages such as Java, C++, and Python to create reliable and scalable applications. 2. Data Scientist
vedha | career tips (tech) 👩‍

vedha | career tips (tech) 👩‍

887 likes

Someone built the frontend review system that paid audit tools have been faking, and it's completely free. #github #opensource #coding #tech #ai
Kirbyhatguytech

Kirbyhatguytech

0 likes

A computer screen displays Haskell code in an IDE, with the title 'LEARNING HOW TO CODE'. The screen shows code lines, file explorer, and status bar, set against a background with butterfly patterns, illustrating the start of a coding journey.
This image titled 'CHOOSING A LANGUAGE' presents popular programming languages: Python, Java, and JavaScript, each with its logo and a brief description highlighting their characteristics and suitability for beginners or experienced programmers.
Titled 'HOW TO START', this image outlines steps for learning to code, including finding resources, joining communities, completing coding challenges on platforms like HackerRank, and focusing on proficiency in one language.
Becoming a tech girly 👩🏾‍💻: Learning How to Code
Hi! I'm new to Lemon8 ✨ and this is my first post ☺️ I'm currently working as a software engineer and thought I'd share some of my ideas about how you can get started with programming. I've invested a lot of time getting underrepresented groups into the field of tech through
Lauren Williams

Lauren Williams

473 likes

Powerful Websites
#software #fy #fypシ゚viral #businesssoftware #freewebsites
Tha Smoke Websites

Tha Smoke Websites

184 likes

A table comparing Web API support across Chrome, Safari, Firefox, and Edge browsers. It details support for APIs like WebUSB, Web Serial, Web Bluetooth, WebHID, Web MIDI, WebGPU, ServiceWorker, Web Authentication, and Filesystem Access, indicating compatibility with checkmarks and crosses.
Web browser API support
Web browser APIs are standardized programming interfaces built into browsers that allow web apps to interact with system capabilities like local storage, multimedia, hardware access, graphics rendering, and authentication This chart compares the support of modern Web APIs across major browsers 😎
Learn Linux with Dan

Learn Linux with Dan

4 likes

A pink mechanical keyboard with glowing keys and colorful string lights, overlaid with text that reads "LEARN SOFTWARE DEV FOR FREE 6 RESOURCES," indicating a guide to free software development learning.
A guide titled "1. LEARN THE INTERNET" for beginners, listing key concepts like HTTPS and DNS. It recommends "Front End Masters - Sections 1-4" and shows the cover of "The Front End Developer/Engineer Handbook 2024."
A guide titled "2. LEARN HTML/CSS" for beginners, highlighting key concepts like web page structure and CSS Flexbox. It recommends "FreeCodeCamp - Responsive Web Design Course" and displays a screenshot of the course page.
Study to be a Frontend Dev - Roadmap (100% Free)
This is a study guide for becoming a Front End Developer! All resources mentioned are FREE. Don’t pay anyone for this info! Why am I not recommending a zero to job course? Two Reasons 1-There is no course that will teach you everything 2-You need to put in some sweat equity, only wat
Study Seal

Study Seal

686 likes

The cover image features an illustration of a person using a laptop with a code editor window, introducing the topic: 'Top 5 Beginner-Friendly Programming Languages for Career Switchers.'
This image presents an illustration of people interacting with a large monitor displaying code symbols, alongside text encouraging career switchers to choose a beginner-friendly programming language for tech.
This slide details HTML & CSS, showing a structural diagram of a webpage and its styled result. It explains why to learn them, highlighting their role in web design and suitability for creative minds.
Top 5 Programming Languages for Career Switchers
#codingforbeginners #learntocode #careerswitch #python #htmlcssjavascript
Aysha

Aysha

29 likes

coding languages worth learning for students 2024
as a cs grad, staying updated with in-demand languages is crucial. Things change quickly in tech, so being adaptable and learning as you go ensures you’ll be competitive and well-informed no matter what your career is. here are some of my top picks for this year: python - versatile and essential f
vvanessaww

vvanessaww

16 likes

Day 16 of my 30-day coding challenge
Create a Stunning Image Slideshow with Smooth Transitions Using HTML, CSS & JavaScript #codingforbeginners #htmlcssforbeginners #studymotivation #programming #softwareengineer
Aysha

Aysha

2 likes

Evony Nard

Evony Nard

0 likes

Day 7 of my 30-day coding challenge!
#webdevelopment #coding #programming #softwareengineer #javascript
Aysha

Aysha

2 likes

HTML Tags You Didn’t Know Exist
#htmlforbeginners #codingjourney #codingforbeginners #webdesigntips #softwareengineering
Aysha

Aysha

32 likes

An open book displays web development concepts, including HTML and JavaScript code snippets, alongside a browser interface showing a web page and its source. The words "Learning JavaScript" are overlaid, with a red arrow highlighting code, reflecting the article's theme of mastering JavaScript.
Journey to Software Engineer
I decided about 6 months ago that I wanted to pivot my career from analyst to software engineer. It hasn’t been easy. I started a bootcamp and loads of other self-guided routes. Trying to get into this field without a Computer Science Degree takes so much discipline. While HTML & CSS have come
Brittany Head

Brittany Head

6 likes

Dynamic Cluster Swirl<
Learn the natural flow of geometry
Evony Nard

Evony Nard

2 likes

Geometry at flow
>Journey Through Emergence<
Evony Nard

Evony Nard

1 like

A dark image showing code on a screen and a keyboard, with text overlays "Top 10 Free Online Courses with Certificates" and "SWIPE FOR MORE," indicating a list of educational resources.
A collage of four logos for online learning platforms: Google Digital Garage, Harvard University, Coursera, and LinkedIn Learning, highlighting various educational opportunities.
A collage of four logos for online learning platforms: Alison, The Open University, a green hexagonal logo with a figure and leaves, and a purple upward-pointing arrow logo.
Top 10 Free Online Courses W/ Certificates
With me having no friends😅 I try and find resourcesful tool and reasouces I can use to better myself in difficult skill aspects! I’ve actually tried a couple of these and currently using Udemy rn! It’s never ending courses. Here’s details on each website! Would you try and of these? Also this is my
Iamnariah

Iamnariah

13.3K likes

Roadmap to Becoming a Frontend Developer
Want to break into frontend development but don’t know where to start? 🤔 This step-by-step roadmap will guide you from beginner to job-ready frontend developer! #codingforbeginners #htmlcssforbeginners #programming #studymotivations #softwareengineer
Aysha

Aysha

52 likes

A woman, Anjali Viramgama, stands in a festive, well-lit indoor garden. The image is titled 'Web development Roadmap for Beginners' with her name and social media handle.
A scroll-like paper details steps 1 and 2 of a web development roadmap: 'Understand the Basics' (HTML) and 'Dive into JavaScript'. Footprints illustrate a path on the paper.
A scroll-like paper outlines steps 3, 4, and 5 of a web development roadmap: 'Version Control' (Git/GitHub), 'Responsive Web Design' (CSS Frameworks), and 'Front-End Development'. Footprints mark a path.
Web development roadmap for beginners
Here's a step-by-step web development roadmap for beginners: 1. Understand the Basics: - HTML (Hypertext Markup Language): Start with learning HTML, the backbone of web development. Understand how to create the structure and content of web pages. - CSS (Cascading Style Sheets): Learn CSS
anjali.gama

anjali.gama

44 likes

Python Libraraies for Web scraping
#python #webscraping #freshlemon8 #usreels #paulalytics
Paulalytics

Paulalytics

1 like

Evony Nard

Evony Nard

0 likes

My GitHub Videos
Just a bunch of my GitHub videos I stuffed into a cool template
JavaScript Josh

JavaScript Josh

1 like

A desk setup featuring a Dell monitor, a white CHERRY keyboard, and a pink mouse, with the text overlay "easy coding projects for beginners" and a "LEARN MORE" button.
A white note card listing "Easy coding projects for beginners" including a to-do list app, personalized calculator, weather app, and simple quiz game, with descriptions for each.
An outdoor scene with a wide road lined by palm trees and buildings under a clear blue sky, with the text overlay "Comment 💻 if you'll try these projects!"
Easy Coding Projects!!
If you want to learn how to code then these are the perfect beginner projects! Here are some fun and easy projects to build your skills: To-Do List App: Create a simple app where you can add, edit, and delete tasks—perfect for practicing JavaScript or Python. ✅ Personalized Calculator: Build a
CompSkyy

CompSkyy

172 likes

How to Create a Progress Bar with HTML + CSS
#HTMLCSS #WebDevelopment #FrontendDev #codewithaysha
Aysha

Aysha

6 likes

Automate your tests
#lemon8dairy #javascript #frontend #developer #ui #ux #html #CSS
SyntaxSidekick

SyntaxSidekick

0 likes

A tech career tip slide titled "FRONTEND DEVELOPER" with "What to study + free resources" and "SWIPE STEP BY STEP GUIDE." It shows a laptop on a desk with a lamp and plant, indicating a guide for aspiring developers.
A slide titled "1. Learn HTML, CSS, and JavaScript" with descriptions for each and study resources like freeCodeCamp and MDN Web Docs, set against a scenic coastal town backdrop.
A slide titled "2. Master Responsive Design and CSS Framework" explaining mobile-friendly designs and frameworks like Bootstrap or Tailwind CSS, with W3Schools and Bootstrap documentation as resources, against a sunny street scene.
How to become a Frontend developer 👩‍💻💰
1. Learn HTML, CSS, and JavaScript - What to study: Begin with HTML for structuring web pages, CSS for styling, and JavaScript for adding interactivity. - Free resources: Websites like freeCodeCamp and MDN Web Docs provide comprehensive lessons on these topics. - Why it’s important: The
vedha | career tips (tech) 👩‍

vedha | career tips (tech) 👩‍

23 likes

See more