HCDD 411 Interactive
1 / 3

Distributed Object Computing

HCDD 411 · Penn State University · Md Touhidul Islam

💡 These slides can run code.
Every lecture is a self-contained HTML file. Students can write and execute JavaScript, jQuery, and API calls directly inside the slides — no IDE, no switching tabs, no copy-paste. Hit the arrow to see a live example.

Course Modules

JavaScript Variables

Declaring Variables

⚠️ Variable Naming Rules:
  • Case sensitive: myVarmyvar
  • Can contain: letters, numbers, $, _
  • Cannot start with a number
  • Cannot use reserved keywords (like if, for, etc.)
PLAYGROUND: Create Your Variables
Output:

Array Method: filter()

Creates a new array with only the elements that pass a test

How it works:
filter() runs a function on each item. If the function returns true, the item is kept. If false, it's removed. The original array is never modified.
EXPERIMENT: Filter an Array
Output: