Answer the question
In order to leave comments, you need to log in
Where is the error in the GULP build?
node -v v11.9.0
gulp -v
[23:31:30] CLI version 2.0.1
[23:31:30] Local version 4.0.0
const gulp = require('gulp');
const sass = require('gulp-sass');
const plumber = require('gulp-plumber');
const autoprefixer = require('gulp-autoprefixer');
const browserSync = require("browser-sync").create();
function style() {
return (
gulp.src("./src/sass/style.sass")
.pipe(plumber())
.pipe(sass()).on("error", sass.logError)
.pipe(autoprefixer())
.pipe(gulp.dest("./src/css/style.css"))
.pipe(browserSync.stream())
);
}
function reload() {
browserSync.reload();
}
function watch() {
browserSync.init({
server: {
baseDir: "./src"
}
});
gulp.watch("src/sass/*.sass").on('change', browserSync.reload);
gulp.watch("src/*.html").on('change', browserSync.reload);
}
exports.style = style;
exports.reload = reload;
exports.watch = watch;
Answer the question
In order to leave comments, you need to log in
The first argument in your function, as I understand it, implies the length of the word?
If so, then the sizeof of the string does not depend on its actual length.
In the inner loop, when you try to swap words, the j variable does not change.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question