I Haz Codes

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Menu
Updating a value

Learn

In this lesson you will learn how to update a single value within an array. The main take home point of this lesson is to always supply an index when you need to use or update a value within an array.

Try

Two arrays have been created. The first stores the names of CS students. The second stores how many green stamps they have.

Write a program that will –

  • Ask for the index of a student.
  • Add one to the same index in green_stamps.
  • Display both arrays.

Comments are closed.

Information