I have studied about primitive data and complex data in w3schools. I searched elsewhere as well, but they don't give sense for me.The sentence stated below defines a primitive data.
A primitive data value is a single data value with no additional properties and methods.
It explicitly says that they don't have properties and methods. However, Primitive data types like string, number have properties and methods. which in turn it is refuting its own definition. Please help me figure out what are primitive data and complex data and what are the difference between them in Javascript?
Edit: a method of string is str.indexOf("abc") and its property str.length. Still they have properties and methods