Programming Basics
Practice problems and improve your skills.
THEORY
All theory for this topic
# Programming Basics in JavaScript
This topic covers the core building blocks of a Node.js program: reading standard input with `fs.readFileSync(0, 'utf8')`, converting numeric text with `Number()`, storing values in `const` or `let`, performing arithmetic, comparing values, combining boolean expressions, and selecting branches with `if / else if / else`.
Use `const` when a binding is not reassigned and `let` when it changes. JavaScript uses `/` for normal division and `%` for the remainder. If a task needs integer division, apply an explicit rounding rule such as `Math.floor(a / b)` when that matches the condition.
Read only the data described in the problem and print only the required answer.
YOUR PROGRESS
Topic progress
PRACTICE
Problems
Solve problems from easy to hard and build your skills step by step.
Add Seven
Multiply Two Numbers
Purchase Cost
Kilometres to Metres
Average of Three Numbers
Minutes to Hours and Minutes
Seconds to Time
Last Digit
Sum of Digits of a Two-Digit Number
Circle Area
Circumference
Price After Discount
Percentage of a Number
Celsius to Fahrenheit
Currency Conversion
Rectangle Perimeter
Rectangle Area
Triangle Area
Average Speed
Distance from Speed and Time
Monthly Salary
Salary After Tax
Difference of Numbers
Absolute Difference
Number of Tens
Number of Hundreds
First Digit of a Three-Digit Number
Last Two Digits
Reverse a Two-Digit Number
Reverse a Three-Digit Number
Even or Odd
Divisible by 3
Divisible by 5
Divisible by 3 and 5
Is the Last Digit Even?
Number in Range
Number Outside Range
Same Sign
Different Signs
Positive, Negative, or Zero
Age Check
Adult Check
Can Buy Item
Password Length Check
Temperature Check
Larger of Two
Smaller of Two
Are Numbers Equal?
Maximum of Three
Minimum of Three
Middle Number
Largest Digit
Smallest Digit
Best Score
Who Is Older?
Competition Winner
Student Grade
Age Category
Day of Week
Days in Month
Leap Year
Triangle Existence
Triangle Type
Coordinate Quadrant
Traffic Light
Rock Paper Scissors
Calculator
Store Discount System
Ticket Price
Bank Interest
User Access Level
Login and Password
User Registration
Loan Conditions
Delivery Availability
Free Delivery
Internet Plan Choice
Season
Time of Day
Clothes for Weather
Smart Alarm
Date Validation
Next Day
Previous Day
Time Difference
Minutes Between Events
Lucky Ticket Number
Number Palindrome
Digit Count
Sum of Four Digits
Product of Four Digits
First and Last Digit
ATM
Chessboard Color
Guess the Number
Smart Calculator
Bank Terminal
Ticket Booking System
Student Performance Analysis
Personal Assistant
No matching problems
Try another filter or search query.