Skip to content

Conversation

codebasecodebase
Copy link
Owner

No description provided.

var vs="eyuioaEYUIOA";// строка с гласными

var r = sa.reduce( (sum, val) => {
if (vs.indexOf (val) !==-1) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно использовать vs.includes(val))


var n=prompt("введите число");
n=parseInt(n);
if ((n%2==0)&&(n!=2)) // любое четное число - составное

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Расставляйте пробелы в коде

<script type="text/javascript">
var n=prompt("введите 3 словосочетания:");

var acronym = n.split(' ').map(function(item){return item[0]}).join('');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

можно стрелочную функцию

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants