Skip to content

This repository contains my learning journey through the fundamentals of JavaScript. It includes hands on examples and practice files that demonstrate key concepts.

Notifications You must be signed in to change notification settings

maimunarashid/javascript-basic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

  1. When adding a number (int) and a string, a problem occurs.
  2. For example, it does not add 20 and '40' as numbers.
  3. Instead, it outputs '2040' a string concatenation.
  4. To perform actual addition, convert the string to a number using parseInt().
  5. See practical implementation in the 'parseInt.js' file.
  6. if the string does not consist of numeric characters, parseInt() will return NaN.
  7. Adding a number and a non-numeric string result: string concatenation. Example: 20 + 'amla' = '20amla' .
  8. Concate is happend only for addition operation (between integer and string or float or string).
  9. For subtraction, multiplication, division, modulus(%) operation string (consist of numbers) also count as number.

About

This repository contains my learning journey through the fundamentals of JavaScript. It includes hands on examples and practice files that demonstrate key concepts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published