Changing the Values ​​of Multiple Attributes in jQuery

You can change the values ​​of several attributes at once, then they need to be passed as an object. For example, let's say we have the following HTML code:

html<input type="text" value="!!!" id="test">

In the Javascript code, we write the attributes value, id and their values ​​as a key-value pair:

javascript$('#test').attr({value: 'text', type: 'password'}); 

Now the HTML code looks like this:

html<input type="password" value="text" id="test">